-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGeneralInterconnectModulePage.cpp
86 lines (67 loc) · 2.85 KB
/
GeneralInterconnectModulePage.cpp
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
// GeneralInterconnectModulePage.cpp : implementation file
//
#include "stdafx.h"
#include "AP210Viewer.h"
#include "GeneralInterconnectModulePage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CGeneralInterconnectModulePage property page
IMPLEMENT_DYNCREATE(CGeneralInterconnectModulePage, CPropertyPage)
CGeneralInterconnectModulePage::CGeneralInterconnectModulePage() : CPropertyPage(CGeneralInterconnectModulePage::IDD)
{
//{{AFX_DATA_INIT(CGeneralInterconnectModulePage)
m_Name = _T("");
m_Transparent = FALSE;
//}}AFX_DATA_INIT
}
CGeneralInterconnectModulePage::~CGeneralInterconnectModulePage()
{
}
void CGeneralInterconnectModulePage::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CGeneralInterconnectModulePage)
DDX_Control(pDX, IDC_GENERAL_INTERCONNECT_MODULE_NAME_VALUE, m_editName);
DDX_Text(pDX, IDC_GENERAL_INTERCONNECT_MODULE_NAME_VALUE, m_Name);
DDX_Check(pDX, IDC_GENERAL_INTERCONNECT_MODULE_TRANSPARENT_VALUE, m_Transparent);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CGeneralInterconnectModulePage, CPropertyPage)
//{{AFX_MSG_MAP(CGeneralInterconnectModulePage)
ON_EN_CHANGE(IDC_GENERAL_INTERCONNECT_MODULE_NAME_VALUE, OnChangeGeneralInterconnectModuleNameValue)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CGeneralInterconnectModulePage message handlers
void CGeneralInterconnectModulePage::setValues(SdaiModel AP210Module, BoardComponent *bc) {
InterconnectModuleRef = bc;
m_Name = InterconnectModuleRef->getName();
m_Transparent = InterconnectModuleRef->getTransparency();
}
void CGeneralInterconnectModulePage::OnGeneralInterconnectModuleTransparentValue() {
// TODO: Add your control notification handler code here
SetModified(TRUE);
}
BOOL CGeneralInterconnectModulePage::OnApply() {
// TODO: Add your specialized code here and/or call the base class
InterconnectModuleRef->setTransparency(m_Transparent);
InterconnectModuleRef->setName(m_Name);
InterconnectModuleRef->UpdateAllViews(NULL);
return CPropertyPage::OnApply();
}
// set what the readonly mode controls we may wish to edit.
void CGeneralInterconnectModulePage::setReadOnly(BOOL mode) {
ReadOnly = mode;
}
void CGeneralInterconnectModulePage::OnChangeGeneralInterconnectModuleNameValue() {
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CPropertyPage::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
SetModified(TRUE);
}