author | Michael Krelin <hacker@klever.net> | 2004-07-05 01:53:09 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2004-07-05 01:53:09 (UTC) |
commit | 955d4e00adc9f39ab93bf21f07506eb75b013c70 (patch) (unidiff) | |
tree | 92493a2c9ac206b822e24a9e5a6f6b1589be6afb /SecretaryPage.cpp | |
download | T42-955d4e00adc9f39ab93bf21f07506eb75b013c70.zip T42-955d4e00adc9f39ab93bf21f07506eb75b013c70.tar.gz T42-955d4e00adc9f39ab93bf21f07506eb75b013c70.tar.bz2 |
initial commit into svn repository
git-svn-id: http://svn.klever.net/kin/T42/trunk@1 fe716a7a-6dde-0310-88d9-d003556173a8
-rw-r--r-- | SecretaryPage.cpp | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/SecretaryPage.cpp b/SecretaryPage.cpp new file mode 100644 index 0000000..affac08 --- a/dev/null +++ b/SecretaryPage.cpp | |||
@@ -0,0 +1,116 @@ | |||
1 | // SecretaryPage.cpp : implementation file | ||
2 | // | ||
3 | |||
4 | #include "stdafx.h" | ||
5 | #include "T42.h" | ||
6 | #include "SecretaryPage.h" | ||
7 | |||
8 | #ifdef _DEBUG | ||
9 | #define new DEBUG_NEW | ||
10 | #undef THIS_FILE | ||
11 | static char THIS_FILE[] = __FILE__; | ||
12 | #endif | ||
13 | |||
14 | ///////////////////////////////////////////////////////////////////////////// | ||
15 | // CSecretaryPage property page | ||
16 | |||
17 | IMPLEMENT_DYNCREATE(CSecretaryPage, CPropertyPage) | ||
18 | |||
19 | CSecretaryPage::CSecretaryPage() : CPropertyPage(CSecretaryPage::IDD) | ||
20 | { | ||
21 | //{{AFX_DATA_INIT(CSecretaryPage) | ||
22 | m_limitBytes = 0; | ||
23 | m_bLimitBytes = FALSE; | ||
24 | m_bLimitTime = FALSE; | ||
25 | m_Greeting = _T(""); | ||
26 | m_limitTime = 0; | ||
27 | m_bLimitWin = FALSE; | ||
28 | m_limitWin = 0; | ||
29 | //}}AFX_DATA_INIT | ||
30 | } | ||
31 | |||
32 | CSecretaryPage::~CSecretaryPage() | ||
33 | { | ||
34 | } | ||
35 | |||
36 | void CSecretaryPage::DoDataExchange(CDataExchange* pDX) | ||
37 | { | ||
38 | CPropertyPage::DoDataExchange(pDX); | ||
39 | //{{AFX_DATA_MAP(CSecretaryPage) | ||
40 | DDX_Control(pDX, IDC_DOWINLIMIT, m_bLimitWinCtl); | ||
41 | DDX_Control(pDX, IDC_WINSPIN, m_WinSpinCtl); | ||
42 | DDX_Control(pDX, IDC_TIMESPIN, m_TimeSpinCtl); | ||
43 | DDX_Control(pDX, IDC_WINLIMIT, m_limitWinCtl); | ||
44 | DDX_Control(pDX, IDC_CHARSPIN, m_CharSpinCtl); | ||
45 | DDX_Control(pDX, IDC_TIMELIMIT, m_limitTimeCtl); | ||
46 | DDX_Control(pDX, IDC_DOTIMELIMIT, m_bLimitTimeCtl); | ||
47 | DDX_Control(pDX, IDC_DOBYTELIMIT, m_bLimitBytesCtl); | ||
48 | DDX_Control(pDX, IDC_BYTELIMIT, m_limitBytesCtl); | ||
49 | DDX_Text(pDX, IDC_BYTELIMIT, m_limitBytes); | ||
50 | DDX_Check(pDX, IDC_DOBYTELIMIT, m_bLimitBytes); | ||
51 | DDX_Check(pDX, IDC_DOTIMELIMIT, m_bLimitTime); | ||
52 | DDX_Text(pDX, IDC_GREETING, m_Greeting); | ||
53 | DDX_Text(pDX, IDC_TIMELIMIT, m_limitTime); | ||
54 | DDX_Check(pDX, IDC_DOWINLIMIT, m_bLimitWin); | ||
55 | DDX_Text(pDX, IDC_WINLIMIT, m_limitWin); | ||
56 | //}}AFX_DATA_MAP | ||
57 | } | ||
58 | |||
59 | |||
60 | BEGIN_MESSAGE_MAP(CSecretaryPage, CPropertyPage) | ||
61 | //{{AFX_MSG_MAP(CSecretaryPage) | ||
62 | ON_BN_CLICKED(IDC_DOBYTELIMIT, OnDobytelimit) | ||
63 | ON_BN_CLICKED(IDC_DOTIMELIMIT, OnDotimelimit) | ||
64 | ON_BN_CLICKED(IDC_DOWINLIMIT, OnDowinlimit) | ||
65 | //}}AFX_MSG_MAP | ||
66 | END_MESSAGE_MAP() | ||
67 | |||
68 | ///////////////////////////////////////////////////////////////////////////// | ||
69 | // CSecretaryPage message handlers | ||
70 | |||
71 | BOOL CSecretaryPage::OnInitDialog() | ||
72 | { | ||
73 | CPropertyPage::OnInitDialog(); | ||
74 | |||
75 | SetTimeLimit(); | ||
76 | SetBytesLimit(); | ||
77 | SetWinLimit(); | ||
78 | m_TimeSpinCtl.SetRange(0,60); | ||
79 | m_WinSpinCtl.SetRange(0,100); | ||
80 | m_CharSpinCtl.SetRange(0,UD_MAXVAL); | ||
81 | UDACCEL uda = {0,512}; | ||
82 | m_CharSpinCtl.SetAccel(1,&uda); | ||
83 | return TRUE; // return TRUE unless you set the focus to a control | ||
84 | // EXCEPTION: OCX Property Pages should return FALSE | ||
85 | } | ||
86 | |||
87 | void CSecretaryPage::SetTimeLimit() | ||
88 | { | ||
89 | m_limitTimeCtl.EnableWindow(m_bLimitTimeCtl.GetCheck()); | ||
90 | } | ||
91 | |||
92 | void CSecretaryPage::SetBytesLimit() | ||
93 | { | ||
94 | m_limitBytesCtl.EnableWindow(m_bLimitBytesCtl.GetCheck()); | ||
95 | } | ||
96 | |||
97 | void CSecretaryPage::SetWinLimit() | ||
98 | { | ||
99 | m_limitWinCtl.EnableWindow(m_bLimitWinCtl.GetCheck()); | ||
100 | } | ||
101 | |||
102 | void CSecretaryPage::OnDobytelimit() | ||
103 | { | ||
104 | SetBytesLimit(); | ||
105 | } | ||
106 | |||
107 | void CSecretaryPage::OnDotimelimit() | ||
108 | { | ||
109 | SetTimeLimit(); | ||
110 | } | ||
111 | |||
112 | void CSecretaryPage::OnDowinlimit() | ||
113 | { | ||
114 | SetWinLimit(); | ||
115 | } | ||
116 | |||