From 258d9d2d72bbf199cd86fd3e7bd824e1f117bab8 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 29 五月 2025 17:49:46 +0800
Subject: [PATCH] 1.放片物流控制和模拟测试;

---
 SourceCode/Bond/Servo/CPageGraph1.cpp |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/SourceCode/Bond/Servo/CPageGraph1.cpp b/SourceCode/Bond/Servo/CPageGraph1.cpp
index 9a45e1c..f274ae0 100644
--- a/SourceCode/Bond/Servo/CPageGraph1.cpp
+++ b/SourceCode/Bond/Servo/CPageGraph1.cpp
@@ -114,6 +114,7 @@
 BOOL CPageGraph1::OnInitDialog()
 {
 	CDialogEx::OnInitDialog();
+	InitRxWindows();
 	SetTimer(1, 3000, nullptr);
 
 
@@ -269,6 +270,11 @@
 	if (m_hbrBkgnd != nullptr) {
 		::DeleteObject(m_hbrBkgnd);
 	}
+
+	if (m_pObserver != nullptr) {
+		m_pObserver->unsubscribe();
+		m_pObserver = NULL;
+	}
 }
 
 void CPageGraph1::OnSize(UINT nType, int cx, int cy)
@@ -417,7 +423,6 @@
 	CString s; s.Format(_T("OnGraphItemClicked %d"), pGraphNmhdr->dwData);
 	SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)m_pGraph->GetIndicateBoxData(pGraphNmhdr->dwData);
 	if (pEquipment != nullptr) {
-		//AfxMessageBox(pEquipment->getName().c_str());
 		theApp.m_model.notifyPtr(RX_CODE_SELECT_EQUIPMENT, pEquipment);
 	}
 
@@ -428,7 +433,6 @@
 {
 	if (1 == nIDEvent) {
 		KillTimer(1);
-		InitRxWindows();
 
 		// 鏇存柊鐘舵��
 		{

--
Gitblit v1.9.3