chenluhua1980
7 天以前 ceb64b6612309fe384e096dcdc8b5a5e0dfe6cce
SourceCode/Bond/BondEq/CProjectPageComponents.cpp
@@ -6,6 +6,7 @@
#include "CProjectPageComponents.h"
#include "afxdialogex.h"
#include "Alarm.h"
#include "AlarmMonitor.h"
// CProjectPageComponents 对话框
@@ -13,7 +14,7 @@
IMPLEMENT_DYNAMIC(CProjectPageComponents, CDialogEx)
CProjectPageComponents::CProjectPageComponents(CWnd* pParent /*=nullptr*/)
   : CDialogEx(IDD_PROJECT_PAGE_COMPENTS, pParent)
   : CDialogEx(IDD_PROJECT_PAGE_COMPONENTS, pParent)
{
   m_crBkgnd = PROPAGE_BACKGROUND_COLOR;
   m_hbrBkgnd = nullptr;
@@ -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);
            }
         }