From 2070871df480a664c9c4e38bc4e4e324682a64c6 Mon Sep 17 00:00:00 2001 From: mrDarker <mr.darker@163.com> Date: 星期四, 03 四月 2025 16:12:28 +0800 Subject: [PATCH] 1. 解决 WebView2 控制器创建失败时闪退的问题 2. 解决连接图销毁时保存设备图形数据闪退的问题 --- SourceCode/Bond/Servo/AlarmDlg.h | 49 ++++++++++++++++++++++++++++--------------------- 1 files changed, 28 insertions(+), 21 deletions(-) diff --git a/SourceCode/Bond/Servo/AlarmDlg.h b/SourceCode/Bond/Servo/AlarmDlg.h index 44c82af..c1ef5dc 100644 --- a/SourceCode/Bond/Servo/AlarmDlg.h +++ b/SourceCode/Bond/Servo/AlarmDlg.h @@ -1,7 +1,10 @@ 锘�#pragma once #include "afxdialogex.h" -#include <vector> -#include <string> +#include "AlarmManager.h" +#include "ListCtrlEx.h" + + +#define ID_MSG_ALARMDLG_HIDE WM_USER + 1024 // CAlarmDlg 瀵硅瘽妗� @@ -14,21 +17,24 @@ virtual ~CAlarmDlg(); private: - //void InitRxWindow(); - //void Resize(); - //void LoadAlarms(); - //void AddAlarm(CAlarmMonitor* pMonitor, CAlarm* pAlarm); - //void UpdateAlarm(CAlarmMonitor* pMonitor, CAlarm* pAlarm); - //void UpdatePageData(); - //void UpdatePageControls(); - //void FillDataToListCtrl(CListCtrl* pListCtrl, const std::vector<std::vector<std::string>>& vecData); + void InitRxWindow(); + void Resize(); + void LoadAlarms(); + void UpdatePageData(); + void UpdatePageControls(); + void FillDataToListCtrl(CListCtrl* pListCtrl, const std::vector<AlarmData>& vecData); + void InsertAlarmData(CListCtrl* pListCtrl, const AlarmData& alarmData); + std::string getCurrentTimeString(); private: COLORREF m_crBkgnd; HBRUSH m_hbrBkgnd; IObserver* m_pObserver; - // 鍏抽敭瀛� + // 鎼滅储鍏抽敭瀛� + int m_nSeverityLevel; + std::string m_strDeviceName; + std::string m_strUnitName; std::string m_strKeyword; // 椤电爜 @@ -43,6 +49,7 @@ // 鎺т欢 CDateTimeCtrl m_dateTimeStart; CDateTimeCtrl m_dateTimeEnd; + CListCtrlEx m_listCtrl; // 瀵硅瘽妗嗘暟鎹� #ifdef AFX_DESIGN_TIME @@ -51,15 +58,15 @@ protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 鏀寔 - //virtual BOOL OnInitDialog(); - //virtual BOOL DestroyWindow(); - //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 OnCbnSelchangeComboDatetime(); - //afx_msg void OnBnClickedButtonSearch(); - //afx_msg void OnBnClickedButtonExport(); - //afx_msg void OnBnClickedButtonPrevPage(); - //afx_msg void OnBnClickedButtonNextPage(); + virtual BOOL OnInitDialog(); + afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); + afx_msg void OnDestroy(); + afx_msg void OnClose(); + afx_msg void OnSize(UINT nType, int cx, int cy); + afx_msg void OnCbnSelchangeComboDatetime(); + afx_msg void OnBnClickedButtonSearch(); + afx_msg void OnBnClickedButtonExport(); + afx_msg void OnBnClickedButtonPrevPage(); + afx_msg void OnBnClickedButtonNextPage(); DECLARE_MESSAGE_MAP() }; -- Gitblit v1.9.3