Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

163 lines
4.7 KiB

  1. /*++
  2. Copyright (C) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. schdprop.h
  5. Abstract:
  6. Implementation of the schedule property page.
  7. --*/
  8. #ifndef _SCHDPROP_H_
  9. #define _SCHDPROP_H_
  10. #if _MSC_VER >= 1000
  11. #pragma once
  12. #endif // _MSC_VER >= 1000
  13. #include "smlogqry.h" // For shared property page data structure
  14. #include "smproppg.h"
  15. #include "smcfghlp.h"
  16. // Dialog controls
  17. #define IDD_SCHEDULE_PROP 600
  18. #define IDC_SCHED_START_GROUP 601
  19. #define IDC_SCHED_STOP_GROUP 602
  20. #define IDC_SCHED_START_AT_ON_CAPTION 603
  21. #define IDC_SCHED_STOP_AT_ON_CAPTION 604
  22. #define IDC_SCHED_STOP_AFTER_STATIC 605
  23. #define IDC_SCHED_STOP_WHEN_STATIC 606
  24. #define IDC_SCHED_FIRST_HELP_CTRL_ID 607
  25. #define IDC_SCHED_START_MANUAL_RDO 607
  26. #define IDC_SCHED_START_AT_RDO 608
  27. #define IDC_SCHED_START_AT_TIME_DT 609
  28. #define IDC_SCHED_START_AT_DATE_DT 610
  29. #define IDC_SCHED_STOP_MANUAL_RDO 611
  30. #define IDC_SCHED_STOP_AT_RDO 612
  31. #define IDC_SCHED_STOP_AFTER_RDO 613
  32. #define IDC_SCHED_STOP_SIZE_RDO 614
  33. #define IDC_SCHED_STOP_AT_TIME_DT 615
  34. #define IDC_SCHED_STOP_AT_DATE_DT 616
  35. #define IDC_SCHED_STOP_AFTER_EDIT 617
  36. #define IDC_SCHED_STOP_AFTER_SPIN 618
  37. #define IDC_SCHED_STOP_AFTER_UNITS_COMBO 619
  38. #define IDC_SCHED_RESTART_CHECK 620
  39. #define IDC_SCHED_EXEC_CHECK 621
  40. #define IDC_SCHED_CMD_EDIT 622
  41. #define IDC_SCHED_CMD_BROWSE_BTN 623
  42. /////////////////////////////////////////////////////////////////////////////
  43. // CScheduleProperty dialog
  44. class CScheduleProperty : public CSmPropertyPage
  45. {
  46. DECLARE_DYNCREATE(CScheduleProperty)
  47. // Construction
  48. public:
  49. CScheduleProperty(
  50. MMC_COOKIE lCookie,
  51. LONG_PTR hConsole,
  52. LPDATAOBJECT pDataObject);
  53. CScheduleProperty();
  54. virtual ~CScheduleProperty();
  55. // Dialog Data
  56. //{{AFX_DATA(CScheduleProperty)
  57. enum { IDD = IDD_SCHEDULE_PROP };
  58. INT m_nStopModeRdo;
  59. INT m_nStartModeRdo;
  60. SYSTEMTIME m_stStartAt;
  61. SYSTEMTIME m_stStopAt;
  62. DWORD m_dwStopAfterCount;
  63. INT m_nStopAfterUnits;
  64. BOOL m_bAutoRestart;
  65. CString m_strEofCommand;
  66. BOOL m_bExecEofCommand;
  67. //}}AFX_DATA
  68. // Overrides
  69. // ClassWizard generate virtual function overrides
  70. //{{AFX_VIRTUAL(CScheduleProperty)
  71. public:
  72. protected:
  73. virtual void OnFinalRelease();
  74. virtual BOOL OnApply();
  75. virtual void OnCancel();
  76. virtual BOOL OnInitDialog();
  77. virtual BOOL OnSetActive();
  78. virtual BOOL OnKillActive();
  79. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  80. virtual void PostNcDestroy();
  81. //}}AFX_VIRTUAL
  82. // Implementation
  83. protected:
  84. virtual INT GetFirstHelpCtrlId ( void ) { return IDC_SCHED_FIRST_HELP_CTRL_ID; }; // Subclass must override.
  85. virtual BOOL IsValidLocalData ();
  86. // Generated message map functions
  87. //{{AFX_MSG(CScheduleProperty)
  88. afx_msg void OnSchedCmdBrowseBtn();
  89. afx_msg void OnSchedRestartCheck();
  90. afx_msg void OnSchedExecCheck();
  91. afx_msg void OnSchedStartRdo();
  92. afx_msg void OnSchedStopRdo();
  93. afx_msg void OnKillfocusSchedStartAtDt(NMHDR*, LRESULT*);
  94. afx_msg void OnKillfocusSchedCmdEdit();
  95. afx_msg void OnKillfocusSchedStopAfterEdit();
  96. afx_msg void OnKillfocusSchedStopAtDt(NMHDR*, LRESULT*);
  97. afx_msg void OnDeltaposSchedStopAfterSpin(NMHDR* pNMHDR, LRESULT* pResult);
  98. afx_msg void OnSelendokSchedStopAfterUnitsCombo();
  99. //}}AFX_MSG
  100. DECLARE_MESSAGE_MAP()
  101. // Generated OLE dispatch map functions
  102. //{{AFX_DISPATCH(CScheduleProperty)
  103. // NOTE - the ClassWizard will add and remove member functions here.
  104. //}}AFX_DISPATCH
  105. DECLARE_DISPATCH_MAP()
  106. DECLARE_INTERFACE_MAP()
  107. // private methods
  108. private:
  109. void SetStartBtnState ( void );
  110. void SetStopBtnState ( void );
  111. void SetCmdBtnState ( void );
  112. void StartModeRadioExchange ( CDataExchange* );
  113. void StopModeRadioExchange ( CDataExchange* );
  114. void StartAtExchange ( CDataExchange* );
  115. void StopAtExchange ( CDataExchange* );
  116. void FillStartTimeStruct ( PSLQ_TIME_INFO );
  117. void UpdateSharedStopTimeStruct ( void );
  118. void SetStopDefaultValues ( PSLQ_TIME_INFO );
  119. BOOL SaveDataToModel ( void );
  120. // public methods
  121. public:
  122. // private member variables
  123. private:
  124. CSmLogQuery *m_pLogQuery;
  125. LONGLONG m_llManualStartTime;
  126. LONGLONG m_llManualStopTime;
  127. DWORD m_dwStopAfterUnitsValue;
  128. DWORD m_dwCurrentStartMode;
  129. };
  130. //{{AFX_INSERT_LOCATION}}
  131. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  132. #endif // _SCHDPROP_H_