From c2d22fc8efd988294ff4a34fd3e31a9743803964 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期三, 08 一月 2025 11:02:16 +0800
Subject: [PATCH] 1.PLC View的加入,关闭,关联等;

---
 SourceCode/Bond/BoounionPLC/PagePlcList.cpp |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/SourceCode/Bond/BoounionPLC/PagePlcList.cpp b/SourceCode/Bond/BoounionPLC/PagePlcList.cpp
index a153ccb..3e0cc18 100644
--- a/SourceCode/Bond/BoounionPLC/PagePlcList.cpp
+++ b/SourceCode/Bond/BoounionPLC/PagePlcList.cpp
@@ -35,6 +35,7 @@
 	ON_WM_CTLCOLOR()
 	ON_WM_DESTROY()
 	ON_WM_SIZE()
+	ON_MESSAGE(ID_MSG_TREE_CLICK_ITEM, OnTreeClickItem)
 END_MESSAGE_MAP()
 
 
@@ -160,6 +161,17 @@
 		rcItem.Width(), rcItem.Height());
 }
 
+LRESULT CPagePlcList::OnTreeClickItem(WPARAM wParam, LPARAM lParam)
+{
+	HTREEITEM hItem = (HTREEITEM)wParam;
+	ASSERT(hItem);
+	CPLC* pPlc = (CPLC*)m_treeCtrl.GetItemData(hItem);
+	ASSERT(pPlc);
+	theApp.m_model.notifyPtr(RX_CODE_SELECT_PLC, pPlc);
+
+	return 0;
+}
+
 void CPagePlcList::ReadPLCList()
 {
 	//m_treeCtrl.InsertItem("PLC1", nullptr, nullptr);
@@ -186,4 +198,4 @@
 	}
 
 	return nullptr;
-}
\ No newline at end of file
+}

--
Gitblit v1.9.3