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.

207 lines
5.0 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1999 **/
  4. /**********************************************************************/
  5. /*
  6. MScopePP.
  7. This file contains all of the prototypes for the
  8. scope property page.
  9. FILE HISTORY:
  10. */
  11. #if !defined(AFX_SCOPEPP_H__A1A51388_AAB3_11D0_AB8B_00C04FC3357A__INCLUDED_)
  12. #define AFX_SCOPEPP_H__A1A51388_AAB3_11D0_AB8B_00C04FC3357A__INCLUDED_
  13. #if _MSC_VER >= 1000
  14. #pragma once
  15. #endif // _MSC_VER >= 1000
  16. #ifndef _SERVER_H
  17. #include "server.h"
  18. #endif
  19. class MScopeCfg
  20. {
  21. public:
  22. DWORD m_dwStartAddress;
  23. DWORD m_dwEndAddress;
  24. DWORD m_dwLeaseTime;
  25. };
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CScopePropGeneral dialog
  28. class CMScopePropGeneral : public CPropertyPageBase
  29. {
  30. DECLARE_DYNCREATE(CMScopePropGeneral)
  31. // Construction
  32. public:
  33. CMScopePropGeneral();
  34. ~CMScopePropGeneral();
  35. // Dialog Data
  36. //{{AFX_DATA(CMScopePropGeneral)
  37. enum { IDD = IDP_MSCOPE_GENERAL };
  38. CEdit m_editName;
  39. CEdit m_editComment;
  40. CEdit m_editTTL;
  41. CButton m_radioUnlimited;
  42. CButton m_radioLimited;
  43. CEdit m_editMinutes;
  44. CEdit m_editHours;
  45. CEdit m_editDays;
  46. CSpinButtonCtrl m_spinTTL;
  47. CSpinButtonCtrl m_spinHours;
  48. CSpinButtonCtrl m_spinMinutes;
  49. CSpinButtonCtrl m_spinDays;
  50. CString m_strComment;
  51. CString m_strName;
  52. //}}AFX_DATA
  53. CWndIpAddress m_ipaStart; // Start Address
  54. CWndIpAddress m_ipaEnd; // End Address
  55. MScopeCfg m_ScopeCfg;
  56. MScopeCfg m_ScopeCfgTemp;
  57. CSubnetInfo m_SubnetInfo;
  58. CSubnetInfo m_SubnetInfoTemp;
  59. BOOL m_bUpdateInfo;
  60. BOOL m_bUpdateLease;
  61. BOOL m_bUpdateRange;
  62. BOOL m_bUpdateTTL;
  63. UINT m_uImage;
  64. // Context Help Support
  65. virtual DWORD * GetHelpMap() { return DhcpGetHelpMap(CMScopePropGeneral::IDD); }
  66. // Overrides
  67. // ClassWizard generate virtual function overrides
  68. //{{AFX_VIRTUAL(CMScopePropGeneral)
  69. public:
  70. virtual BOOL OnApply();
  71. protected:
  72. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  73. //}}AFX_VIRTUAL
  74. virtual BOOL OnPropertyChange(BOOL bScope, LONG_PTR *ChangeMask);
  75. // Implementation
  76. protected:
  77. // Generated message map functions
  78. //{{AFX_MSG(CMScopePropGeneral)
  79. virtual BOOL OnInitDialog();
  80. afx_msg void OnRadioLeaseLimited();
  81. afx_msg void OnRadioLeaseUnlimited();
  82. afx_msg void OnChangeEditLeaseDays();
  83. afx_msg void OnChangeEditLeaseHours();
  84. afx_msg void OnChangeEditLeaseMinutes();
  85. afx_msg void OnChangeEditTTL();
  86. afx_msg void OnChangeEditScopeComment();
  87. afx_msg void OnChangeEditScopeName();
  88. afx_msg void OnCheckDefault();
  89. //}}AFX_MSG
  90. afx_msg void OnChangeIpAddrStart();
  91. afx_msg void OnChangeIpAddrEnd();
  92. DECLARE_MESSAGE_MAP()
  93. void ActivateDuration(BOOL fActive);
  94. void ValidateLeaseTime();
  95. public:
  96. };
  97. /////////////////////////////////////////////////////////////////////////////
  98. // CMScopePropLifetime dialog
  99. class CMScopePropLifetime : public CPropertyPageBase
  100. {
  101. DECLARE_DYNCREATE(CMScopePropLifetime)
  102. // Construction
  103. public:
  104. CMScopePropLifetime();
  105. ~CMScopePropLifetime();
  106. // Dialog Data
  107. //{{AFX_DATA(CMScopePropLifetime)
  108. enum { IDD = IDP_MSCOPE_LIFETIME };
  109. CButton m_radioFinite;
  110. CButton m_radioInfinite;
  111. //}}AFX_DATA
  112. DATE_TIME m_Expiry;
  113. // Overrides
  114. // ClassWizard generate virtual function overrides
  115. //{{AFX_VIRTUAL(CMScopePropLifetime)
  116. public:
  117. virtual BOOL OnApply();
  118. protected:
  119. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  120. //}}AFX_VIRTUAL
  121. void UpdateControls();
  122. // Context Help Support
  123. virtual DWORD * GetHelpMap() { return DhcpGetHelpMap(CMScopePropLifetime::IDD); }
  124. // Implementation
  125. protected:
  126. // Generated message map functions
  127. //{{AFX_MSG(CMScopePropLifetime)
  128. virtual BOOL OnInitDialog();
  129. afx_msg void OnDatetimechangeDatetimepickerTime(NMHDR* pNMHDR, LRESULT* pResult);
  130. afx_msg void OnDatetimechangeDatetimepickerDate(NMHDR* pNMHDR, LRESULT* pResult);
  131. afx_msg void OnRadioScopeInfinite();
  132. afx_msg void OnRadioMscopeFinite();
  133. //}}AFX_MSG
  134. DECLARE_MESSAGE_MAP()
  135. };
  136. //{{AFX_INSERT_LOCATION}}
  137. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  138. //}}AFX
  139. class CMScopeProperties : public CPropertyPageHolderBase
  140. {
  141. friend class CScopePropGeneral;
  142. public:
  143. CMScopeProperties(ITFSNode * pNode,
  144. IComponentData * pComponentData,
  145. ITFSComponentData * pTFSCompData,
  146. LPCTSTR pszSheetName);
  147. virtual ~CMScopeProperties();
  148. ITFSComponentData * GetTFSCompData()
  149. {
  150. if (m_spTFSCompData)
  151. m_spTFSCompData->AddRef();
  152. return m_spTFSCompData;
  153. }
  154. void SetVersion(LARGE_INTEGER & liVersion);
  155. public:
  156. CMScopePropGeneral m_pageGeneral;
  157. CMScopePropLifetime m_pageLifetime;
  158. protected:
  159. SPITFSComponentData m_spTFSCompData;
  160. LARGE_INTEGER m_liVersion;
  161. };
  162. #endif // !defined(AFX_SCOPEPP_H__A1A51388_AAB3_11D0_AB8B_00C04FC3357A__INCLUDED_)