From 9f0747e902bbb61229aa46a6bcf802921ee6fb58 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期六, 21 六月 2025 14:35:33 +0800
Subject: [PATCH] 1. 主窗口添加端口设置按钮,弹出本地测试的端口配置界面
---
SourceCode/Bond/Servo/resource.h | 0
SourceCode/Bond/Servo/TopToolbar.h | 1 +
SourceCode/Bond/Servo/Servo.rc | 0
SourceCode/Bond/Servo/TopToolbar.cpp | 8 ++++++++
SourceCode/Bond/Servo/ServoDlg.cpp | 5 +++++
5 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/Servo.rc b/SourceCode/Bond/Servo/Servo.rc
index e8c771b..7f88830 100644
--- a/SourceCode/Bond/Servo/Servo.rc
+++ b/SourceCode/Bond/Servo/Servo.rc
Binary files differ
diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index bf9c874..7084946 100644
--- a/SourceCode/Bond/Servo/ServoDlg.cpp
+++ b/SourceCode/Bond/Servo/ServoDlg.cpp
@@ -21,6 +21,7 @@
#include "SystemLogManagerDlg.h"
#include "UserManager.h"
#include "SystemLogManager.h"
+#include "PortConfigurationDlg.h"
#ifdef _DEBUG
@@ -885,6 +886,10 @@
m_pTopToolbar->GetBtn(IDC_BUTTON_STOP)->EnableWindow(FALSE);
}
}
+ else if (id == IDC_BUTTON_PORT_CONFIG) {
+ CPortConfigurationDlg dlg;
+ dlg.DoModal();
+ }
else if (id == IDC_BUTTON_ROBOT) {
theApp.m_model.getMaster().clearError();
SERVO::CEFEM* pEFEM = (SERVO::CEFEM*)theApp.m_model.getMaster().getEquipment(EQ_ID_EFEM);
diff --git a/SourceCode/Bond/Servo/TopToolbar.cpp b/SourceCode/Bond/Servo/TopToolbar.cpp
index 32c9d8a..a601129 100644
--- a/SourceCode/Bond/Servo/TopToolbar.cpp
+++ b/SourceCode/Bond/Servo/TopToolbar.cpp
@@ -30,6 +30,7 @@
DDX_Control(pDX, IDC_BUTTON_STOP, m_btnStop);
DDX_Control(pDX, IDC_BUTTON_ALARM, m_btnAlarm);
DDX_Control(pDX, IDC_BUTTON_SETTINGS, m_btnSettings);
+ DDX_Control(pDX, IDC_BUTTON_PORT_CONFIG, m_btnPortConfig);
DDX_Control(pDX, IDC_BUTTON_ROBOT, m_btnRobot);
DDX_Control(pDX, IDC_BUTTON_OPERATOR, m_btnOperator);
}
@@ -55,6 +56,7 @@
InitBtn(m_btnAlarm, "Alarm_o_32.ico", "Alarm_gray_32.ico");
InitBtn(m_btnSettings, "Settings_High_32.ico", "Settings_Gray_32.ico");
InitBtn(m_btnRobot, "Robot_High_32.ico", "Robot_Gray_32.ico");
+ InitBtn(m_btnPortConfig, "PortConfig_High_32.ico", "PortConfig_Gray_32.ico");
InitBtn(m_btnOperator, "Operator_High_32.ico", "Operator_Gray_32.ico");
HMENU hMenu = LoadMenu(AfxGetInstanceHandle(), MAKEINTRESOURCEA(IDR_MENU_OPEATOR));
m_btnOperator.SetMenu(hMenu);
@@ -133,6 +135,11 @@
x += BTN_WIDTH;
x += 2;
+ pItem = GetDlgItem(IDC_BUTTON_PORT_CONFIG);
+ pItem->MoveWindow(x, y, BTN_WIDTH, nBthHeight);
+ x += BTN_WIDTH;
+ x += 2;
+
pItem = GetDlgItem(IDC_BUTTON_ROBOT);
pItem->MoveWindow(x, y, BTN_WIDTH, nBthHeight);
x += BTN_WIDTH;
@@ -186,6 +193,7 @@
case IDC_BUTTON_STOP:
case IDC_BUTTON_ALARM:
case IDC_BUTTON_SETTINGS:
+ case IDC_BUTTON_PORT_CONFIG:
case IDC_BUTTON_ROBOT:
GetParent()->SendMessage(ID_MSG_TOOLBAR_BTN_CLICKED, 0, LOWORD(wParam));
break;
diff --git a/SourceCode/Bond/Servo/TopToolbar.h b/SourceCode/Bond/Servo/TopToolbar.h
index b65ad85..e4e0408 100644
--- a/SourceCode/Bond/Servo/TopToolbar.h
+++ b/SourceCode/Bond/Servo/TopToolbar.h
@@ -34,6 +34,7 @@
CBlButton m_btnStop;
CBlButton m_btnAlarm;
CBlButton m_btnSettings;
+ CBlButton m_btnPortConfig;
CBlButton m_btnRobot;
CBlButton m_btnOperator;
diff --git a/SourceCode/Bond/Servo/resource.h b/SourceCode/Bond/Servo/resource.h
index 2c3b3b4..e5eb250 100644
--- a/SourceCode/Bond/Servo/resource.h
+++ b/SourceCode/Bond/Servo/resource.h
Binary files differ
--
Gitblit v1.9.3