Leaked source code of windows server 2003
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.

147 lines
3.7 KiB

  1. /*++
  2. Copyright (c) 1994-95 Microsoft Corporation
  3. Module Name:
  4. srvppgr.h
  5. Abstract:
  6. Server property page (repl) implementation.
  7. Author:
  8. Don Ryan (donryan) 02-Feb-1995
  9. Environment:
  10. User Mode - Win32
  11. Revision History:
  12. JeffParh (jeffparh) 16-Dec-1996
  13. o Disallowed server as own enterprise server.
  14. o Changed "Start At" to use locale info for time format rather than
  15. private registry settings. Merged OnClose() functionality into
  16. OnKillActive().
  17. o Added warning of possible license loss when changing replication
  18. target server.
  19. o No longer automatically saves when page is flipped.
  20. --*/
  21. #ifndef _SRVPPGR_H_
  22. #define _SRVPPGR_H_
  23. const DWORD INTERVAL_MIN = 1;
  24. const DWORD INTERVAL_MAX = 72;
  25. const DWORD HOUR_MIN_24 = 0;
  26. const DWORD HOUR_MAX_24 = 23;
  27. const DWORD HOUR_MIN_12 = 1;
  28. const DWORD HOUR_MAX_12 = 12;
  29. const DWORD MINUTE_MIN = 0;
  30. const DWORD MINUTE_MAX = 59;
  31. const DWORD SECOND_MIN = 0;
  32. const DWORD SECOND_MAX = 59;
  33. const DWORD DEFAULT_EVERY = 24;
  34. class CServerPropertyPageReplication : public CPropertyPage
  35. {
  36. DECLARE_DYNCREATE(CServerPropertyPageReplication)
  37. private:
  38. CServer* m_pServer;
  39. BOOL m_bReplAt;
  40. BOOL m_bUseEsrv;
  41. DWORD m_nStartingHour;
  42. DWORD m_nHour;
  43. DWORD m_nMinute;
  44. DWORD m_nSecond;
  45. BOOL m_bPM;
  46. CString m_strEnterpriseServer;
  47. DWORD m_nReplicationTime;
  48. BOOL m_bOnInit;
  49. CString m_str1159;
  50. CString m_str2359;
  51. BOOL m_bIsMode24;
  52. BOOL m_bIsHourLZ;
  53. CString m_strSep1;
  54. CString m_strSep2;
  55. DWORD m_nHourMax;
  56. DWORD m_nHourMin;
  57. BOOL EditValidate(short *pID, BOOL *pfBeep);
  58. void EditInvalidDlg(BOOL fBeep);
  59. public:
  60. DWORD m_dwUpdateStatus;
  61. public:
  62. CServerPropertyPageReplication();
  63. ~CServerPropertyPageReplication();
  64. void GetProfile();
  65. void InitPage(CServer* pServer);
  66. void SaveReplicationParams();
  67. BOOL Refresh();
  68. virtual BOOL OnKillActive();
  69. virtual void OnOK();
  70. //{{AFX_DATA(CServerPropertyPageReplication)
  71. enum { IDD = IDD_PP_SERVER_REPLICATION };
  72. CEdit m_everyEdit;
  73. CEdit m_esrvEdit;
  74. CButton m_atBtn;
  75. CButton m_everyBtn;
  76. CButton m_dcBtn;
  77. CButton m_esrvBtn;
  78. CSpinButtonCtrl m_spinAt;
  79. CSpinButtonCtrl m_spinEvery;
  80. CEdit m_atBorderEdit;
  81. CEdit m_atSep1Edit;
  82. CEdit m_atSep2Edit;
  83. CEdit m_atHourEdit;
  84. CEdit m_atMinEdit;
  85. CEdit m_atSecEdit;
  86. CListBox m_atAmPmEdit;
  87. //}}AFX_DATA
  88. //{{AFX_VIRTUAL(CServerPropertyPageReplication)
  89. protected:
  90. virtual void DoDataExchange(CDataExchange* pDX);
  91. //}}AFX_VIRTUAL
  92. protected:
  93. //{{AFX_MSG(CServerPropertyPageReplication)
  94. virtual BOOL OnInitDialog();
  95. afx_msg void OnAt();
  96. afx_msg void OnDc();
  97. afx_msg void OnEsrv();
  98. afx_msg void OnEvery();
  99. afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  100. afx_msg void OnSetfocusAmpm();
  101. afx_msg void OnKillfocusAmpm();
  102. afx_msg void OnKillFocusHour();
  103. afx_msg void OnSetFocusHour();
  104. afx_msg void OnKillFocusMinute();
  105. afx_msg void OnSetFocusMinute();
  106. afx_msg void OnSetFocusSecond();
  107. afx_msg void OnKillFocusSecond();
  108. afx_msg void OnSetfocusEvery();
  109. afx_msg void OnKillfocusEvery();
  110. afx_msg void OnUpdateEsrvName();
  111. afx_msg void OnUpdateAtHour();
  112. afx_msg void OnUpdateAtMinute();
  113. afx_msg void OnUpdateAtSecond();
  114. afx_msg void OnUpdateEveryValue();
  115. //}}AFX_MSG
  116. DECLARE_MESSAGE_MAP()
  117. };
  118. #endif // _SRVPPGR_H_