From d0c990eaf6cfdbf77c1f4f8db272f4964ec43310 Mon Sep 17 00:00:00 2001
From: C3204 <zhengyabo@lanpucloud.cn>
Date: 星期四, 15 一月 2026 15:58:15 +0800
Subject: [PATCH] 优化西门子S7通讯:支持多数据类型、UI布局调整及配置持久化修复   详细说明:    1. 通讯核心 (SiemensLBS7)        * 多类型支持:完善 SendMessage 和 ReceiveMsg,支持 Bool, Byte, Int, DInt, Real, Double, Word, DWord, String的读写。        * Bool 解析优化:增强布尔值解析逻辑,支持字符串 "1"/"0" 及 "True"/"False"(不区分大小写)。        * 错误反馈:捕获数据转换异常(如格式错误),将具体错误信息写入 Msg 属性,便于 UI 展示。

---
 LB_VisionProcesses/Communicators/CommunicatorForm.Designer.cs |   29 ++++++++++++++++++++++++++---
 1 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/LB_VisionProcesses/Communicators/CommunicatorForm.Designer.cs b/LB_VisionProcesses/Communicators/CommunicatorForm.Designer.cs
index d9998c9..6c2c74c 100644
--- a/LB_VisionProcesses/Communicators/CommunicatorForm.Designer.cs
+++ b/LB_VisionProcesses/Communicators/CommunicatorForm.Designer.cs
@@ -37,6 +37,8 @@
             btnConnect = new Button();
             cmbIP = new ComboBox();
             lblIP = new Label();
+            lblDataType = new Label();
+            cmbDataType = new ComboBox();
             grpReceive = new GroupBox();
             txtReceiveMsg = new TextBox();
             txtSendMsg = new TextBox();
@@ -74,7 +76,7 @@
             grpSetting.ForeColor = SystemColors.Control;
             grpSetting.Location = new Point(18, 74);
             grpSetting.Name = "grpSetting";
-            grpSetting.Size = new Size(200, 146);
+            grpSetting.Size = new Size(200, 210);
             grpSetting.TabIndex = 0;
             grpSetting.TabStop = false;
             grpSetting.Text = "閫氳閰嶇疆";
@@ -196,13 +198,32 @@
             grpTest.Controls.Add(lblAddress);
             grpTest.Controls.Add(lblMsg);
             grpTest.Controls.Add(txtMsg);
+            grpTest.Controls.Add(lblDataType);
+            grpTest.Controls.Add(cmbDataType);
             grpTest.ForeColor = SystemColors.Control;
             grpTest.Location = new Point(241, 74);
             grpTest.Name = "grpTest";
-            grpTest.Size = new Size(320, 146);
+            grpTest.Size = new Size(320, 210);
             grpTest.TabIndex = 12;
             grpTest.TabStop = false;
             grpTest.Text = "閫氳娴嬭瘯";
+            // 
+            // lblDataType
+            // 
+            lblDataType.AutoSize = true;
+            lblDataType.Location = new Point(160, 115);
+            lblDataType.Name = "lblDataType";
+            lblDataType.Size = new Size(32, 17);
+            lblDataType.TabIndex = 8;
+            lblDataType.Text = "绫诲瀷";
+            // 
+            // cmbDataType
+            // 
+            cmbDataType.FormattingEnabled = true;
+            cmbDataType.Location = new Point(200, 112);
+            cmbDataType.Name = "cmbDataType";
+            cmbDataType.Size = new Size(94, 25);
+            cmbDataType.TabIndex = 9;
             // 
             // lblCom
             // 
@@ -252,7 +273,7 @@
             // btnRun
             // 
             btnRun.ForeColor = SystemColors.WindowText;
-            btnRun.Location = new Point(215, 109);
+            btnRun.Location = new Point(215, 168);
             btnRun.Name = "btnRun";
             btnRun.Size = new Size(75, 23);
             btnRun.TabIndex = 3;
@@ -412,5 +433,7 @@
         private ReaLTaiizor.Controls.ControlBox controlBox1;
         private TextBox txtAddress;
         private Label lblAddress;
+        private Label lblDataType;
+        private ComboBox cmbDataType;
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3