-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBatchGeneralProp.cpp
More file actions
161 lines (108 loc) · 2.93 KB
/
BatchGeneralProp.cpp
File metadata and controls
161 lines (108 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
// BatchGeneralProp.cpp : implementation file
//
#include "stdafx.h"
#include "fireplus.h"
#include "BatchOptionsSet.h"
#include "wxset.h"
#include "OverlayDialog.h"
#include "FireDay.h"
#include "PeriodDoc.h"
#include "SplitterFrame.h"
#include "BatchGeneralProp.h"
#include "BatchPropSheet.h"
#include "MainFrm.h"
#include <windows.h>
#include <shlobj.h>
#include "DirDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CFireplusApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CBatchGeneralProp property page
IMPLEMENT_DYNCREATE(CBatchGeneralProp, CPropertyPage)
CBatchGeneralProp::CBatchGeneralProp() : CPropertyPage(CBatchGeneralProp::IDD)
{
//{{AFX_DATA_INIT(CBatchGeneralProp)
promptDesc = FALSE;
//}}AFX_DATA_INIT
}
CBatchGeneralProp::~CBatchGeneralProp()
{
}
void CBatchGeneralProp::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CBatchGeneralProp)
DDX_Check(pDX, IDC_PROMPT_DESC, promptDesc);
DDX_Control(pDX, IDC_EDIT_RUN_DESC, runDesc);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CBatchGeneralProp, CPropertyPage)
//{{AFX_MSG_MAP(CBatchGeneralProp)
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDC_PROMPT_DESC, OnBnClickedPromptDesc)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CBatchGeneralProp message handlers
BOOL CBatchGeneralProp::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// TODO: Add extra initialization here
CWnd *child;
CWnd *topMost = NULL;
child = ((CBatchPropSheet *)GetParent())->mainFrame->MDIGetActive();
CRuntimeClass* prt = child->GetRuntimeClass();
if(strcmp( prt->m_lpszClassName, "CSplitterFrame" ) == 0)
topMost = child;
ReadData();
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CBatchGeneralProp::SetBatchOptionsSet(CBatchOptionsSet * set)
{
boptSet = set;
}
void CBatchGeneralProp::SaveData()
{
UpdateData();
//just set boptSet members, Edit and Update called by property sheet
if (boptSet->IsOpen()){
boptSet->Edit();
boptSet->m_PromptDesc = promptDesc;
CString str;
runDesc.GetWindowText(str);
str.Trim();
boptSet->m_runDesc = str;
boptSet->Update();
}
}
void CBatchGeneralProp::ReadData()
{
if(boptSet->IsOpen())
{
CString str;
runDesc.SetLimitText(70);
runDesc.SetWindowText(boptSet->m_runDesc);
promptDesc = boptSet->m_PromptDesc;
}
}
void CBatchGeneralProp::WriteData()
{
UpdateData();
if (boptSet->IsOpen()){
boptSet->Edit();
CString str;
runDesc.GetWindowText(str);
boptSet->m_runDesc = str;
boptSet->m_PromptDesc = promptDesc;
boptSet->Update();
}
}
void CBatchGeneralProp::OnBnClickedPromptDesc()
{
// TODO: Add your control notification handler code here
}