| | |
| | | |
| | | void UpdatePageInfo(); // 更新分页信息 |
| | | void CreateDynamicControls(); // 动态创建控件 |
| | | void CreateStaticControl(int x, int y, int width, int height, const CString& text, bool hasBorder = false, TextAlign alignment = AlignLeft); // 创建静态控件 |
| | | 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(); // 清除动态创建的控件 |
| | | void UpdatePLCStates(); // 定时器更新状态的方法 |
| | | |
| | | private: |
| | | int m_nInitialWidth; |
| | |
| | | std::map<int, CFont*> m_mapFonts; // 字体映射 |
| | | std::map<int, CRect> m_mapCtrlLayouts; // 控件布局映射 |
| | | std::vector<IOData> m_displayData; // 当前显示的数据 |
| | | std::vector<CString> m_inputPLCAddresses; // 存储 1 列 PLC 地址 |
| | | std::vector<CString> m_outputPLCAddresses; // 存储 4 列 PLC 地址 |
| | | |
| | | private: |
| | | CStatic m_staticPageNum; |
| | |
| | | afx_msg void OnSize(UINT nType, int cx, int cy); |
| | | afx_msg void OnBnClickedButtonPrevPage(); |
| | | afx_msg void OnBnClickedButtonNextPage(); |
| | | afx_msg void OnTimer(UINT_PTR nIDEvent); |
| | | afx_msg void OnClose(); |
| | | }; |