LAPTOP-T815PCOQ\25526
2024-11-28 468a5415022b3fec6c874f4ff690041a5fe2c195
SourceCode/Bond/BondEq/View/IOMonitoringDlg.h
@@ -2,6 +2,7 @@
#include "afxdialogex.h"
#include "IOManager.h"
#include "BLLabel.h"
#include "CPLC.h"
// CIOMonitoringDlg 对话框
@@ -14,6 +15,7 @@
   CIOMonitoringDlg(CWnd* pParent = nullptr);   // 标准构造函数
   virtual ~CIOMonitoringDlg();
   void SetIOManager(const std::string& machineName); // 设置 IOManager 和机器名
   void SetPLC(CPLC* pPLC); // 设置 PLC
// 对话框数据
#ifdef AFX_DESIGN_TIME
@@ -31,9 +33,11 @@
   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; // 当前页