CalendarResourcesDlg.h
上传用户:szled88
上传日期:2015-04-09
资源大小:43957k
文件大小:5k
源码类别:

对话框与窗口

开发平台:

Visual C++

  1. // CalendarResourcesDlg.h : header file
  2. //
  3. // This file is a part of the XTREME TOOLKIT PRO MFC class library.
  4. // (c)1998-2008 Codejock Software, All Rights Reserved.
  5. //
  6. // THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE
  7. // RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN
  8. // CONSENT OF CODEJOCK SOFTWARE.
  9. //
  10. // THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED
  11. // IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO
  12. // YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A
  13. // SINGLE COMPUTER.
  14. //
  15. // CONTACT INFORMATION:
  16. // support@codejock.com
  17. // http://www.codejock.com
  18. //
  19. /////////////////////////////////////////////////////////////////////////////
  20. #if !defined(AFX_CALENDARRESOURCESDLG_H__F27ED8D3_BCA4_430D_A121_D2F7259BC6DD__INCLUDED_)
  21. #define AFX_CALENDARRESOURCESDLG_H__F27ED8D3_BCA4_430D_A121_D2F7259BC6DD__INCLUDED_
  22. #if _MSC_VER > 1000
  23. #pragma once
  24. #endif // _MSC_VER > 1000
  25. /////////////////////////////////////////////////////////////////////////////
  26. class CCheckListBox_withEvents : public CCheckListBox
  27. {
  28. public:
  29. CCheckListBox_withEvents();
  30. void setParentDlg(CCalendarResourcesDlg* pParentDlg);
  31. void AllSetCheck(int nCheck);
  32. void LockAllCheckBoxes(int nCheckLocked);
  33. void UnlockAllCheckBoxes(int nCheck = -1);
  34. protected:
  35. int m_nCheckLocked;
  36. CCalendarResourcesDlg* m_pParentDlg;
  37. void OnLButtonDown(UINT nFlags, CPoint point);
  38. void OnLButtonDblClk(UINT nFlags, CPoint point);
  39. void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  40. void _OnCheckChanged();
  41. DECLARE_MESSAGE_MAP()
  42. };
  43. /////////////////////////////////////////////////////////////////////////////
  44. // CCalendarResourcesDlg dialog
  45. class CCalendarResourcesDlg : public CDialog
  46. {
  47. friend class CCheckListBox_withEvents;
  48. // Construction
  49. public:
  50. CCalendarResourcesDlg(CXTPCalendarResourcesManager* pRCMan, CWnd* pParent = NULL);   // standard constructor
  51. // Dialog Data
  52. //{{AFX_DATA(CCalendarResourcesDlg)
  53. enum { IDD = IDD_DIALOG_RESOURCES };
  54. CButton m_ctrlResourcesMoveDown;
  55. CButton m_ctrlResourcesMoveUp;
  56. CListCtrl m_ctrlDataProviders;
  57. CButton m_ctrlDataProviderDelete;
  58. CButton m_ctrlDataProviderEdit;
  59. CButton m_ctrlDataProviderAdd;
  60. CCheckListBox m_ctrlResources;
  61. CButton m_ctrlResourcesDelete;
  62. CButton m_ctrlResourcesAdd;
  63. CEdit m_ctrlRCName;
  64. CButton m_ctrlRCNameAuto;
  65. CComboBox m_ctrlRCDataProvider;
  66. CCheckListBox_withEvents m_ctrlSchedules;
  67. CButton m_ctrlSchedulesAll;
  68. CButton m_ctrlSchedulesDelete;
  69. CButton m_ctrlSchedulesAdd;
  70. CButton m_ctrlScheduleChangeName;
  71. CEdit m_ctrlScheduleNewName;
  72. //}}AFX_DATA
  73. // Overrides
  74. // ClassWizard generated virtual function overrides
  75. //{{AFX_VIRTUAL(CCalendarResourcesDlg)
  76. protected:
  77. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  78. //}}AFX_VIRTUAL
  79. // Implementation
  80. protected:
  81. CXTPCalendarResourcesManager* m_pRCMan;
  82. BOOL m_bChangeEditRcName_internal;
  83. int m_nRcNameAuto_StoredState;
  84. void UpdateDataProvidersList();
  85. void UpdateResourcesList();
  86. void UpdateResourceInfoPane();
  87. void UpdateSchedulesList();
  88. void UpdateSchedulesList_saveState();
  89. void UpdateDataProviders_RCCombo();
  90. void EnableResourceInfoPane(BOOL bEnable);
  91. void EnableSchedulesInfoControls(BOOL bEnable);
  92. void UpdateSchedulesAll_DependsCtrls();
  93. void ApplySchedules();
  94. void ApplyUpdateRcNameAuto();
  95. void ProcessAutoName();
  96. CString _CalcAutoRCName();
  97. CXTPCalendarResourceDescription* GetSelRCDesc(int* pnIndex = NULL);
  98. // Generated message map functions
  99. //{{AFX_MSG(CCalendarResourcesDlg)
  100. virtual BOOL OnInitDialog();
  101. afx_msg void OnBtnDataProviderAdd();
  102. afx_msg void OnBtnDataProviderDelete();
  103. afx_msg void OnBtnDataProviderEdit();
  104. afx_msg void OnBtnResourcesAdd();
  105. afx_msg void OnBtnResourcesDelete();
  106. afx_msg void OnBtnSchedulesAdd();
  107. afx_msg void OnBtnSchedulesDelede();
  108. afx_msg void OnBtnSchedulesChange();
  109. afx_msg void OnChkRcNameAuto();
  110. afx_msg void OnChkSchedulesAll();
  111. afx_msg void OnChangeEditRcName();
  112. afx_msg void OnSelchangeListResources();
  113. afx_msg void OnSelchangeListSchedules();
  114. afx_msg void OnItemchangedListctrlDataProviders(NMHDR* pNMHDR, LRESULT* pResult);
  115. virtual void OnCancel();
  116. virtual void OnOK();
  117. afx_msg void OnSelchangeCmbRcDataProvider();
  118. afx_msg void OnKillfocusListSchedules();
  119. afx_msg void OnBtnResourcesMoveDown();
  120. afx_msg void OnBtnResourcesMoveUp();
  121. //}}AFX_MSG
  122. void _OnSelchangeSchedules();
  123. DECLARE_MESSAGE_MAP()
  124. };
  125. //{{AFX_INSERT_LOCATION}}
  126. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  127. #endif // !defined(AFX_CALENDARRESOURCESDLG_H__F27ED8D3_BCA4_430D_A121_D2F7259BC6DD__INCLUDED_)