From c8173fa96f226ff88412d07955fb340de4681ffc Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 06 三月 2025 11:21:34 +0800
Subject: [PATCH] 1.实现 CIM model change指令下发到机器。与之前的从CC link读数据逻辑稍有不同,下发指令为写数据,因此,从原CStep派生两个类,CReadStep(用于读数据),CWriteStep(用于写数据),然后根据使用场景选择合适的基数做应用层逻辑。已完成待测试验证
---
SourceCode/Bond/Servo/CPanelAttributes.cpp | 23 ++++++++++++++---------
1 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/SourceCode/Bond/Servo/CPanelAttributes.cpp b/SourceCode/Bond/Servo/CPanelAttributes.cpp
index e36312d..75241c1 100644
--- a/SourceCode/Bond/Servo/CPanelAttributes.cpp
+++ b/SourceCode/Bond/Servo/CPanelAttributes.cpp
@@ -62,11 +62,12 @@
unsigned int nSize = attrubutes.size();
for (unsigned int i = 0; i < nSize; i++) {
SERVO::CAttribute* pAttribute = attrubutes.getAttribute(i);
-
- m_gridCtrl.AddProperty(new CMFCPropertyGridProperty(
+ CMFCPropertyGridProperty* pProperty = new CMFCPropertyGridProperty(
pAttribute->getName().c_str(),
pAttribute->getValue().c_str(),
- pAttribute->getDescription().c_str()));
+ pAttribute->getDescription().c_str());
+ pProperty->AllowEdit(TRUE);
+ m_gridCtrl.AddProperty(pProperty);
}
}
@@ -146,16 +147,20 @@
pItem = GetDlgItem(IDC_LINE1);
pItem->MoveWindow(rcClient.right - 3, 0, 3, rcClient.Height());
+ int x2 = rcClient.right - 6;
int y = 3;
- pItem = GetDlgItem(IDC_LABEL_TITLE);
- pItem->GetWindowRect(&rcItem);
- pItem->MoveWindow(5, y, rcClient.Width() - 8, rcItem.Height());
-
pItem = GetDlgItem(IDC_BUTTON_CLOSE);
pItem->GetWindowRect(&rcItem);
- pItem->MoveWindow(rcClient.right - 6 - rcItem.Width(), y, rcItem.Width(), rcItem.Height());
+ pItem->MoveWindow(x2 - rcItem.Width(), y, rcItem.Width(), rcItem.Height());
+ x2 -= rcItem.Width();
+ x2 -= 3;
+
+ pItem = GetDlgItem(IDC_LABEL_TITLE);
+ pItem->GetWindowRect(&rcItem);
+ pItem->MoveWindow(5, y, x2 - 5, rcItem.Height());
y += rcItem.Height();
- y += 3;
+ y += 8;
+
GetDlgItem(IDC_MFCPROPERTYGRID1)->MoveWindow(5, y, rcClient.Width() - 13, rcClient.Height() - 3 - y);
}
--
Gitblit v1.9.3