| | |
| | | #include "CProjectPageComponents.h" |
| | | #include "afxdialogex.h" |
| | | #include "Alarm.h" |
| | | #include "AlarmMonitor.h" |
| | | |
| | | |
| | | // CProjectPageComponents 对话框 |
| | |
| | | } |
| | | } |
| | | } |
| | | 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); |
| | | } |
| | | } |