1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- // StaffAchievementSet.cpp : implementation file
- //
- #include "stdafx.h"
- #include "LYFZIPManage.h"
- #include "StaffAchievementSet.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // StaffAchievementSet dialog
- StaffAchievementSet::StaffAchievementSet(CWnd* pParent /*=NULL*/)
- : CDialog(StaffAchievementSet::IDD, pParent)
- {
- //{{AFX_DATA_INIT(StaffAchievementSet)
- m_time = 20;
- m_check1 = 1;
- m_bautoshutdown = FALSE;
- //}}AFX_DATA_INIT
- }
- void StaffAchievementSet::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(StaffAchievementSet)
- DDX_Control(pDX, IDC_SPIN1, m_spin);
- DDX_Text(pDX, IDC_EDITtime, m_time);
- DDV_MinMaxUInt(pDX, m_time, 12, 24);
- DDX_Check(pDX, IDC_CHECK1, m_check1);
- DDX_Check(pDX, IDC_CHECK2, m_bautoshutdown);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(StaffAchievementSet, CDialog)
- //{{AFX_MSG_MAP(StaffAchievementSet)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // StaffAchievementSet message handlers
- BOOL StaffAchievementSet::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // TODO: Add extra initialization here
- m_spin.SetRange (12, 24);
- CString version = _T ("Version 1.0");
- m_bautoshutdown=AfxGetApp()->GetProfileInt (version, "autoshutdown", 1);
- m_time=AfxGetApp()->GetProfileInt (version, "shutdowntime", 20);
- UpdateData(false);
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- void StaffAchievementSet::OnOK()
- {
- // TODO: Add extra validation here
- UpdateData();
- CString version = _T ("Version 1.0");
- AfxGetApp()->WriteProfileInt (version, "autoshutdown", m_bautoshutdown);
- AfxGetApp()->WriteProfileInt (version, "shutdowntime", m_time);
- CDialog::OnOK();
- }
|