From 102c26b397f7466779f712c31752973e17a195f6 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 04 三月 2025 14:56:15 +0800
Subject: [PATCH] 1.增加属性值列表展示面板。

---
 SourceCode/Bond/Servo/ServoDlg.cpp |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index 4217090..f3d2cd5 100644
--- a/SourceCode/Bond/Servo/ServoDlg.cpp
+++ b/SourceCode/Bond/Servo/ServoDlg.cpp
@@ -167,6 +167,15 @@
 					}
 				}
 			}
+			else if (RX_CODE_SELECT_STEP == code) {
+				SERVO::CStep* pStep = nullptr;
+				if (pAny->getPtrValue("ptr", (void*&)pStep)) {
+					ASSERT(pStep);
+					ASSERT(m_pPanelAttributes);
+					m_pPanelAttributes->loadDataFromStep(pStep);
+				}
+			}
+
 			pAny->release();
 		}, [&]() -> void {
 			// onComplete
@@ -305,6 +314,10 @@
 	m_pPanelMaster = new CPanelMaster();
 	m_pPanelMaster->Create(IDD_PANEL_MASTER, this);
 	m_pPanelMaster->ShowWindow(SW_SHOW);
+	m_pPanelAttributes = new CPanelAttributes();
+	m_pPanelAttributes->Create(IDD_PANEL_ATTRIBUTES, this);
+	m_pPanelAttributes->ShowWindow(SW_SHOW);
+
 
 
 	// 调整初始窗口位置
@@ -558,6 +571,12 @@
 		m_pPanelMaster = nullptr;
 	}
 
+	if (m_pPanelAttributes != nullptr) {
+		m_pPanelAttributes->DestroyWindow();
+		delete m_pPanelAttributes;
+		m_pPanelAttributes = nullptr;
+	}
+	
 	if (m_hbrBkgnd != nullptr) {
 		::DeleteObject(m_hbrBkgnd);
 	}
@@ -763,6 +782,11 @@
 		x += nPanelWidth;
 	}
 
+	if (m_pPanelAttributes != nullptr) {
+		nPanelWidth = m_pPanelAttributes->getPanelWidth();
+		m_pPanelAttributes->MoveWindow(x, y, nPanelWidth, rcClient.Height());
+		x += nPanelWidth;
+	}
 
 	pItem = GetDlgItem(IDC_SERVO_GRAPH1);
 	pItem->GetClientRect(&rcItem);

--
Gitblit v1.9.3