| | |
| | | #include "afxdialogex.h" |
| | | #include "IOManager.h" |
| | | #include "BLLabel.h" |
| | | #include "CPLC.h" |
| | | |
| | | |
| | | // CIOMonitoringDlg 对话框 |
| | |
| | | CIOMonitoringDlg(CWnd* pParent = nullptr); // 标准构造函数 |
| | | virtual ~CIOMonitoringDlg(); |
| | | void SetIOManager(const std::string& machineName); // 设置 IOManager 和机器名 |
| | | void SetPLC(CPLC* pPLC); // 设置 PLC |
| | | |
| | | // 对话框数据 |
| | | #ifdef AFX_DESIGN_TIME |
| | |
| | | void CreateStaticControl(int x, int y, int width, int height, const CString& text, bool hasBorder = false, TextAlign alignment = AlignLeft, std::function<void()> clickCallback = nullptr); // 创建静态控件 |
| | | void DisplayCurrentPage(); // 显示当前页数据 |
| | | void ClearDynamicControls(); // 清除动态创建的控件 |
| | | bool ParsePLCAddress(const CString& address, MC::SOFT_COMPONENT& component, int& addr); // 解析 PLC 地址 |
| | | void UpdatePLCStates(); // 定时器更新状态的方法 |
| | | |
| | | private: |
| | | CPLC* m_pPLC; |
| | | int m_nInitialWidth; |
| | | int m_nInitialHeight; |
| | | int m_nCurrentPage; // 当前页 |