12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #include "stdafx2.h"
- #include "WizSetCfgPage.h"
- CWizSetCfgPage::CWizSetCfgPage(IInitializeService* pService)
- :m_pInitService(pService), m_nCenterSettingPort(1024)
- {
- }
- CWizSetCfgPage::~CWizSetCfgPage(void)
- {
- }
- //////////////////////////////////////////////////////////////////////
- // Message handlers
- BOOL CWizSetCfgPage::OnInitDialog ( HWND hwndFocus, LPARAM lParam )
- {
- DoDataExchange(false);
- SetMsgHandled(FALSE);
- return TRUE;
- }
- //////////////////////////////////////////////////////////////////////
- // Notification handlers
- int CWizSetCfgPage::OnSetActive()
- {
- SetWizardButtons (PSWIZB_FINISH);
- // 0 = allow activate
- // -1 = go back to page that was active
- // page ID = jump to page
- return 0;
- }
- INT_PTR CWizSetCfgPage::OnWizardFinish()
- {
- // FALSE = allow finish
- // TRUE = prevent finish
- // HWND = prevent finish and set focus to HWND (CommCtrl 5.80 only)
-
- if (!DoDataExchange(TRUE) || m_strCenterSettingServer1.IsEmpty() || m_nCenterSettingPort <=0)
- {
- MessageBoxA("输入数据校验不通过,请重新输入");
- return TRUE;
- }
- if (!m_pInitService->AsyncInitCenterSetting(m_strCenterSettingServer1, m_strCenterSettingServer2, m_nCenterSettingPort))
- {
- MessageBoxA(CSimpleStringA::Format("初始化集中配置失败, %s", m_pInitService->GetLastErrMsg()));
- return TRUE;
- }
- return TRUE;
- }
|