LAPTOP-SNT8I5JK\Boounion
2025-03-10 19261d011387ec57d646decc945aadaf8913eeab
SourceCode/Bond/Servo/AlarmDlg.cpp
@@ -5,6 +5,7 @@
#include "Servo.h"
#include "afxdialogex.h"
#include "AlarmDlg.h"
#include "AlarmManager.h"
#include "Common.h"
#include <iomanip>
@@ -84,13 +85,14 @@
                  bool result = alarmManager.addAlarm(alarmData, alarmEventId);
                  if (result) {
                     LOGI("<CAlarmDlg> Alarm added successfully!");
                  }
               }
                  else {
                     LOGI("<CAlarmDlg> Failed to add alarm.");
                  }
               }
            }
         }
            }
         }
      pAny->release();
      }, [&]() -> void {
@@ -277,7 +279,6 @@
   pListCtrl->SetColumnWidth(7, LVSCW_AUTOSIZE_USEHEADER);
   // 计算总页数
   int totalRecords = AlarmManager::getInstance().getTotalAlarmCount("", "", m_strDeviceName, m_strUnitName, m_strKeyword, m_szTimeStart, m_szTimeEnd);
   m_nTotalPages = (totalRecords + PAGE_SIZE - 1) / PAGE_SIZE;
   m_nCurPage = 1;
@@ -286,6 +287,11 @@
   return TRUE;  // return TRUE unless you set the focus to a control
   // 异常: OCX 属性页应返回 FALSE
}
BOOL CAlarmDlg::DestroyWindow()
{
   return CDialogEx::DestroyWindow();
}
HBRUSH CAlarmDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
@@ -471,4 +477,4 @@
   // 点击下一页
   m_nCurPage++;
   UpdatePageData();  // 调用分页更新函数
}
}