LAPTOP-SNT8I5JK\Boounion
2024-12-05 8da35975404dd92801b1006f76f2ea6c200016d2
SourceCode/Bond/BondEq/View/IOMonitoringDlg.h
@@ -28,13 +28,18 @@
   void AdjustControls(float dScaleX, float dScaleY);            // 调整控件大小
   void AdjustControlFont(CWnd* pWnd, int nWidth, int nHeight);   // 调整控件字体大小
   void UpdatePageInfo();         // 更新分页信息
   void CreateDynamicControls();   // 动态创建控件
   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 UpdatePageInfo();          // 更新分页信息
   void CreateDynamicControls();    // 动态创建控件
   CWnd* CreateStaticControl(UINT id, int x, int y, int width, int height, const CString& text, bool hasBorder = false, TextAlign alignment = AlignLeft, std::function<void()> clickCallback = nullptr); // 创建静态控件
   CWnd* GetStaticControl(UINT id); // 获取静态控件
   CString& GetStaticControlAddrText(UINT id, CString& strAddr); // 获取静态控件地址文本
   void DisplayCurrentPage();       // 显示当前页数据
   void ClearDynamicControls();    // 清除动态创建的控件
   bool ParsePLCAddress(const CString& address, MC::SOFT_COMPONENT& component, int& addr); // 解析 PLC 地址
   void UpdatePLCStates();         // 定时器更新状态的方法
   bool GeneratePLCAddress(MC::SOFT_COMPONENT component, int addr, CString& address, bool bHexFormat = false); // 生成 PLC 地址
   void ReadPLCData(MC::SOFT_COMPONENT softComponent, int startAddr, int endAddr, std::function<void(IMcChannel*, int, char*, unsigned int, int)> callback); // 读取 PLC 数据
   void ReadPLCStates();          // 定时器读PLC
   void UpdatePLCStatesToUI();       // 定时器更新状态的方法
private:
   CPLC* m_pPLC;
@@ -64,6 +69,7 @@
   afx_msg void OnSize(UINT nType, int cx, int cy);
   afx_msg void OnBnClickedButtonPrevPage();
   afx_msg void OnBnClickedButtonNextPage();
   afx_msg LRESULT OnIoClicked(WPARAM wParam, LPARAM lParam);
   afx_msg void OnTimer(UINT_PTR nIDEvent);
   afx_msg void OnClose();
};