From 6747bc043d0af20d6fa02a6cf385d81eb44643d0 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期六, 28 六月 2025 11:29:42 +0800
Subject: [PATCH] 1.自绘按钮,修改为支持文字在按钮下,或在按钮右。 2.日志页,修改为“包含”和“排除”关键字,以及正则表达式的支持,便于在调试过程中快速观察日志
---
SourceCode/Bond/BoounionPLC/PagePlcList.cpp | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/BoounionPLC/PagePlcList.cpp b/SourceCode/Bond/BoounionPLC/PagePlcList.cpp
index 56b9ff5..fd94ec0 100644
--- a/SourceCode/Bond/BoounionPLC/PagePlcList.cpp
+++ b/SourceCode/Bond/BoounionPLC/PagePlcList.cpp
@@ -85,6 +85,18 @@
theApp.m_model.notifyPtr(RX_CODE_SELECT_PLC, pSelectedPlc);
}
}
+ else if (RX_PLC_STATE_CHANGED == code) {
+ CPLC* pPlc;
+ if (pAny->getPtrValue("ptr", (void*&)pPlc)) {
+ HTREEITEM hItem = FindItem(pPlc);
+ if (hItem != nullptr && pPlc->isConnected()) {
+ m_treeCtrl.ShowItemBadgeDotMode(hItem);
+ }
+ else {
+ m_treeCtrl.HideItemBadge(hItem);
+ }
+ }
+ }
pAny->release();
}, [&]() -> void {
@@ -191,6 +203,10 @@
for (auto item : plcs) {
HTREEITEM hItem = m_treeCtrl.InsertItem(item.second->getName().c_str(), nullptr, nullptr);
m_treeCtrl.SetItemData(hItem, (DWORD_PTR)item.second);
+ m_treeCtrl.SetItemBadge(hItem, TREE_BADGE_BACKGROUND, TREE_BADGE_FOREGROUND);
+ if (item.second->isConnected()) {
+ m_treeCtrl.ShowItemBadgeDotMode(hItem);
+ }
if (hItemFirst == nullptr) {
hItemFirst = hItem;
}
--
Gitblit v1.9.3