📄 pollingpage.cpp
字号:
// PollingPage.cpp : implementation file
//
#include "stdafx.h"
#include "Toller.h"
#include "PollingPage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPollingPage property page
IMPLEMENT_DYNCREATE(CPollingPage, CPropertyPage)
CPollingPage::CPollingPage() : CPropertyPage(CPollingPage::IDD)
{
//{{AFX_DATA_INIT(CPollingPage)
m_uInterval = 1;
m_nServerUpdateLogAt = 0;
m_nTollFromDate = 9;
m_nUpdateLocalLogWhen = 0;
m_uCostPerKB = 20;
//}}AFX_DATA_INIT
}
CPollingPage::~CPollingPage()
{
}
void CPollingPage::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPollingPage)
DDX_Control(pDX, IDC_SPIN3, m_spin3);
DDX_Control(pDX, IDC_SPIN2, m_spin2);
DDX_Control(pDX, IDC_SPIN1, m_spin);
DDX_Text(pDX, IDC_INTERVAL, m_uInterval);
DDV_MinMaxUInt(pDX, m_uInterval, 0, 23);
DDX_Text(pDX, IDC_EDIT_LOGUPDATETIME, m_nServerUpdateLogAt);
DDV_MinMaxUInt(pDX, m_nServerUpdateLogAt, 0, 23);
DDX_Text(pDX, IDC_TOLL_FROM_DATE, m_nTollFromDate);
DDV_MinMaxUInt(pDX, m_nTollFromDate, 1, 28);
DDX_CBIndex(pDX, IDC_UPDATE_LOCAL_LOG, m_nUpdateLocalLogWhen);
DDX_Text(pDX, IDC_COSTPERKB, m_uCostPerKB);
DDV_MinMaxUInt(pDX, m_uCostPerKB, 1, 1000);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPollingPage, CPropertyPage)
//{{AFX_MSG_MAP(CPollingPage)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPollingPage message handlers
BOOL CPollingPage::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// TODO: Add extra initialization here
m_spin.SetRange(0, 23);
m_spin.SetBase(10);
m_spin.SetPos(m_uInterval);
m_spin2.SetRange(0, 23);
m_spin2.SetBase(10);
m_spin2.SetPos(m_nServerUpdateLogAt);
m_spin3.SetRange(1, 28);
m_spin3.SetBase(10);
m_spin3.SetPos(m_nUpdateLocalLogWhen);
UpdateData(FALSE);
CComboBox* pCombo=(CComboBox*)GetDlgItem(IDC_UPDATE_LOCAL_LOG);
pCombo->SetCurSel(m_nUpdateLocalLogWhen);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CPollingPage::OnOK()
{
// TODO: Add your specialized code here and/or call the base class
if(m_nServerUpdateLogAt==m_uInterval)
{
AfxMessageBox("Don't make the Server Update Log Time and\n Polling Time to the same value!");
}
CPropertyPage::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -