| | |
| | | #pragma once |
| | | #include "CHMPropertyPage.h" |
| | | #include "CEquipment.h" |
| | | #include "JobSlotGrid.h" |
| | | |
| | | |
| | | // CEquipmentPage1 对话框 |
| | | |
| | | struct SignalInfo |
| | | { |
| | | CString strName; // 信号名称 |
| | | bool bCurrentState; // 当前状态(ON/OFF) |
| | | bool bClickable; // 是否允许点击 |
| | | }; |
| | | |
| | | class CEquipmentPage1 : public CHMPropertyPage |
| | | { |
| | |
| | | void setEquipment(SERVO::CEquipment* pEquipment); |
| | | |
| | | private: |
| | | int m_nCurrentDeviceID; |
| | | SERVO::CEquipment* m_pEquipment; |
| | | std::vector<SignalInfo> m_vSignalList; |
| | | CJobSlotGrid m_ctrlSignalPanel; |
| | | std::map<int, std::vector<SignalInfo>> m_mapSignalListByID; |
| | | |
| | | void LoadSignalListFromCSV(const CString& strFilePath); |
| | | void InitSignalListForDevice(int nDeviceID); |
| | | void UpdateSignalState(int nRow, int nCol, bool bNewState); |
| | | void InitSignalSlotTextAndClickable(); |
| | | void UpdateAllSignalStatesFromDevice(); |
| | | void ResetSignalPanel(); |
| | | |
| | | |
| | | // 对话框数据 |
| | |
| | | DECLARE_MESSAGE_MAP() |
| | | public: |
| | | virtual BOOL OnInitDialog(); |
| | | afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); |
| | | afx_msg void OnDestroy(); |
| | | afx_msg void OnSize(UINT nType, int cx, int cy); |
| | | afx_msg void OnTimer(UINT_PTR nIDEvent); |
| | | }; |