112 lines
4.8 KiB
C++
112 lines
4.8 KiB
C++
|
<EFBFBD><EFBFBD>// DLG_WxWorkSetup.cpp: <EFBFBD>[<EFBFBD>s<EFBFBD>e<EFBFBD>N
|
|||
|
//
|
|||
|
|
|||
|
#include "stdafx.h"
|
|||
|
#include "SmsManager.h"
|
|||
|
#include "DLG_WxWorkSetup.h"
|
|||
|
#include "afxdialogex.h"
|
|||
|
|
|||
|
|
|||
|
// DLG_WxWorkSetup <EFBFBD>[Fh
|
|||
|
|
|||
|
IMPLEMENT_DYNAMIC(DLG_WxWorkSetup, CDialogEx)
|
|||
|
|
|||
|
DLG_WxWorkSetup::DLG_WxWorkSetup(CWnd* pParent /*=nullptr*/)
|
|||
|
: CDialogEx(IDD_WXWORKSETUP, pParent)
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
DLG_WxWorkSetup::~DLG_WxWorkSetup()
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
void DLG_WxWorkSetup::DoDataExchange(CDataExchange* pDX)
|
|||
|
{
|
|||
|
CDialogEx::DoDataExchange(pDX);
|
|||
|
|
|||
|
DDX_Text(pDX, IDC_WXWORKSETUP_USER, m_strUser);
|
|||
|
DDX_Text(pDX, IDC_WXWORKSETUP_SETTIME, m_strSetTime);
|
|||
|
|
|||
|
DDX_Text(pDX, IDC_WXWORKSETUP_TIMER, m_lTimer);
|
|||
|
DDV_MinMaxUInt(pDX, m_lTimer, 1, 100);
|
|||
|
DDX_Text(pDX, IDC_WXWORKSETUP_AUTOEND, m_lAutoEnd);
|
|||
|
DDV_MinMaxUInt(pDX, m_lAutoEnd, 0, 1000);
|
|||
|
|
|||
|
DDX_Check(pDX, IDC_WXWORKSETUP_CHECKUP, m_bCheckUp);
|
|||
|
DDX_Check(pDX, IDC_WXWORKSETUP_SEND, m_bSend);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
BEGIN_MESSAGE_MAP(DLG_WxWorkSetup, CDialogEx)
|
|||
|
ON_BN_CLICKED(IDOK, &DLG_WxWorkSetup::OnBnClickedOk)
|
|||
|
END_MESSAGE_MAP()
|
|||
|
|
|||
|
|
|||
|
// DLG_WxWorkSetup <EFBFBD>mo`Ytz<EFBFBD>^
|
|||
|
|
|||
|
|
|||
|
void DLG_WxWorkSetup::OnBnClickedOk()
|
|||
|
{
|
|||
|
|
|||
|
if (!UpdateData(true))
|
|||
|
return;
|
|||
|
|
|||
|
if (m_lTimer <= 0 || m_lTimer > 100)
|
|||
|
{
|
|||
|
MessageBox(_T("<00>[8h<38>c<EFBFBD><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>e<EFBFBD><65> g<><67><0C><><EFBFBD><EFBFBD>h<EFBFBD>g"), _T("<00>c<EFBFBD><63>"), MB_ICONINFORMATION);
|
|||
|
GetDlgItem(IDC_WXWORKSETUP_TIMER)->SetFocus();
|
|||
|
}
|
|||
|
|
|||
|
if (m_lAutoEnd < 0 || m_lAutoEnd > 1000)
|
|||
|
{
|
|||
|
MessageBox(_T("ꁨR<EA81A8>d<EFBFBD>m<EFBFBD>e<EFBFBD><65> g<><67><0C><><EFBFBD><EFBFBD>h<EFBFBD>g"), _T("<00>c<EFBFBD><63>"), MB_ICONINFORMATION);
|
|||
|
GetDlgItem(IDC_WXWORKSETUP_AUTOEND)->SetFocus();
|
|||
|
}
|
|||
|
m_Setup.bCheckUp = m_bCheckUp;
|
|||
|
m_Setup.bSend = m_bSend;
|
|||
|
m_Setup.lTimer = m_lTimer;
|
|||
|
m_Setup.lAutoEnd = m_lAutoEnd;
|
|||
|
|
|||
|
CDialogEx::OnOK();
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
BOOL DLG_WxWorkSetup::OnInitDialog()
|
|||
|
{
|
|||
|
CDialogEx::OnInitDialog();
|
|||
|
|
|||
|
|
|||
|
m_bCheckUp = m_Setup.bCheckUp;
|
|||
|
m_bSend = m_Setup.bSend;
|
|||
|
m_lTimer = m_Setup.lTimer;
|
|||
|
m_lAutoEnd = m_Setup.lAutoEnd;
|
|||
|
|
|||
|
m_strUser = m_Setup.szUser + CString(_T(" - ")) + m_Setup.szWxName;
|
|||
|
m_strSetTime.Format(_T("%04d.%02d.%02d %02d:%02d"), m_Setup.tStart.wYear, m_Setup.tStart.wMonth, m_Setup.tStart.wDay, m_Setup.tStart.wHour, m_Setup.tStart.wMinute);
|
|||
|
|
|||
|
if (m_lTimer <= 0 || m_lTimer > 100)
|
|||
|
m_lTimer = 8;
|
|||
|
|
|||
|
if (m_lTimer < 0 || m_lTimer > 1000)
|
|||
|
m_lTimer = 500;
|
|||
|
|
|||
|
UpdateData(false);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
return TRUE; // return TRUE unless you set the focus to a control
|
|||
|
// _8^: OCX ^\'`u<EFBFBD><EFBFBD>^ԏ<EFBFBD>V FALSE
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
void DLG_WxWorkSetup::SetSetup(REQ_WxWork_Setup setup)
|
|||
|
{
|
|||
|
m_Setup = setup;
|
|||
|
}
|
|||
|
REQ_WxWork_Setup DLG_WxWorkSetup::GetSetup()
|
|||
|
{
|
|||
|
return m_Setup;
|
|||
|
}
|
|||
|
|