#pragma once #include "afxwin.h" #include "afxcmn.h" #include "XPButton.h" #include "ListCtrlCl.h" // CDlg_Controller 对话框 class CDlg_Controller : public CDialog { DECLARE_DYNAMIC(CDlg_Controller) public: CDlg_Controller(CWnd* pParent = NULL); // 标准构造函数 virtual ~CDlg_Controller(); // 对话框数据 enum { IDD = IDD_DLG_CONTROLLER }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 DECLARE_MESSAGE_MAP() public: CString m_sEdit_ControlName; CString m_sEdit_ControlSN; CString m_sEdit_Door1Name; CString m_sEdit_Door2Name; CString m_sEdit_Door3Name; CString m_sEdit_Door4Name; CString m_sComb_Port; CComboBox m_Comb_Port; virtual BOOL OnInitDialog(); afx_msg void OnEnChangeEditSn(); CListCtrlCl m_List_Controller; afx_msg void OnBnClickedBtnAdd(); afx_msg void OnBnClickedBtnSave(); afx_msg void OnBnClickedBtnDel(); afx_msg void OnNMClickListControl(NMHDR *pNMHDR, LRESULT *pResult); void SetPos( CRect rect ); CXPButton m_Btn_Add; CXPButton m_Btn_Modify; CXPButton m_Btn_Delete; afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); afx_msg BOOL OnEraseBkgnd(CDC* pDC); CString m_sEdit_IP; int m_nEdit_Port; CComboBox m_Comb_WordMode; afx_msg void OnCbnSelchangeComboWordmdoe(); int m_nComb_WordMode; int InitList(void); int m_nDoorDelayTime[4]; CString m_sDoorControlType[4]; CComboBox m_Comb_DoorNumber; afx_msg void OnCbnSelchangeComboDoornumber(); afx_msg void OnTimer(UINT nIDEvent); afx_msg void OnNMDblclkListControl(NMHDR *pNMHDR, LRESULT *pResult); ////////////// CString GetDoorNameFromDoorInfo( CString sDoorInfo ); void ReadController( CListCtrl *pListCtrl ); };