Dlg_Controller.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #pragma once
  2. #include "afxwin.h"
  3. #include "afxcmn.h"
  4. #include "XPButton.h"
  5. #include "ListCtrlCl.h"
  6. // CDlg_Controller 对话框
  7. class CDlg_Controller : public CDialog
  8. {
  9. DECLARE_DYNAMIC(CDlg_Controller)
  10. public:
  11. CDlg_Controller(CWnd* pParent = NULL); // 标准构造函数
  12. virtual ~CDlg_Controller();
  13. // 对话框数据
  14. enum { IDD = IDD_DLG_CONTROLLER };
  15. protected:
  16. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
  17. DECLARE_MESSAGE_MAP()
  18. public:
  19. CString m_sEdit_ControlName;
  20. CString m_sEdit_ControlSN;
  21. CString m_sEdit_Door1Name;
  22. CString m_sEdit_Door2Name;
  23. CString m_sEdit_Door3Name;
  24. CString m_sEdit_Door4Name;
  25. CString m_sComb_Port;
  26. CComboBox m_Comb_Port;
  27. virtual BOOL OnInitDialog();
  28. afx_msg void OnEnChangeEditSn();
  29. CListCtrlCl m_List_Controller;
  30. afx_msg void OnBnClickedBtnAdd();
  31. afx_msg void OnBnClickedBtnSave();
  32. afx_msg void OnBnClickedBtnDel();
  33. afx_msg void OnNMClickListControl(NMHDR *pNMHDR, LRESULT *pResult);
  34. void SetPos( CRect rect );
  35. CXPButton m_Btn_Add;
  36. CXPButton m_Btn_Modify;
  37. CXPButton m_Btn_Delete;
  38. afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  39. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  40. CString m_sEdit_IP;
  41. int m_nEdit_Port;
  42. CComboBox m_Comb_WordMode;
  43. afx_msg void OnCbnSelchangeComboWordmdoe();
  44. int m_nComb_WordMode;
  45. int InitList(void);
  46. int m_nDoorDelayTime[4];
  47. CString m_sDoorControlType[4];
  48. CComboBox m_Comb_DoorNumber;
  49. afx_msg void OnCbnSelchangeComboDoornumber();
  50. afx_msg void OnTimer(UINT nIDEvent);
  51. afx_msg void OnNMDblclkListControl(NMHDR *pNMHDR, LRESULT *pResult);
  52. //////////////
  53. CString GetDoorNameFromDoorInfo( CString sDoorInfo );
  54. void ReadController( CListCtrl *pListCtrl );
  55. };