mrDarker
2025-06-03 0393d1ff2ebc378b3c4cff9b45f72ebc8a4ea516
SourceCode/Bond/BondEq/CProjectPageComponents.cpp
@@ -6,6 +6,7 @@
#include "CProjectPageComponents.h"
#include "afxdialogex.h"
#include "Alarm.h"
#include "AlarmMonitor.h"
// CProjectPageComponents 对话框
@@ -72,18 +73,16 @@
               }
            }
         }
         else if (RX_CODE_ALARM_EVENT == code) {
            CComponent* pComponent = nullptr;
            CAlarm* pAlarm = nullptr;
            pAny->getObject("obj", (IRxObject*&)pAlarm);
         else if (RX_CODE_ALARM_ON == code
            || RX_CODE_ALARM_OFF == code) {
            CAlarmMonitor* pComponent = nullptr;
            pAny->getPtrValue("ptr", (void*&)pComponent);
            ASSERT(pComponent);
            ASSERT(pAlarm);
            HTREEITEM hItem = getTreeItem(pComponent);
            if (hItem != nullptr) {
               if(pAlarm->getStatus() == 1)
               if (pComponent->isAlarming())
                  m_treeComponents.ShowItemBadgeDotMode(hItem);
               else if (pAlarm->getStatus() == 2)
               else
                  m_treeComponents.HideItemBadge(hItem);
            }
         }