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_SmartVision/Forms/Pages/HistoricalDataPage/HistoricalDataEditPage.Designer.cs | 81 ++++++++++++++++++++--------------------
1 files changed, 41 insertions(+), 40 deletions(-)
diff --git a/LB_SmartVision/Forms/Pages/HistoricalDataPage/HistoricalDataEditPage.Designer.cs b/LB_SmartVision/Forms/Pages/HistoricalDataPage/HistoricalDataEditPage.Designer.cs
index dffa1cc..4796997 100644
--- a/LB_SmartVision/Forms/Pages/HistoricalDataPage/HistoricalDataEditPage.Designer.cs
+++ b/LB_SmartVision/Forms/Pages/HistoricalDataPage/HistoricalDataEditPage.Designer.cs
@@ -46,8 +46,8 @@
labelStartTime = new Label();
dataGridViewHD = new DataGridView();
tableLayoutPanel4 = new TableLayoutPanel();
- hopeButton1 = new ReaLTaiizor.Controls.HopeButton();
- hopeButton2 = new ReaLTaiizor.Controls.HopeButton();
+ btnHisDataFind = new ReaLTaiizor.Controls.HopeButton();
+ btnHisDataExport = new ReaLTaiizor.Controls.HopeButton();
grpHisData.SuspendLayout();
tableLayoutPanel1.SuspendLayout();
tableLayoutPanel2.SuspendLayout();
@@ -285,8 +285,8 @@
tableLayoutPanel4.ColumnCount = 2;
tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
tableLayoutPanel4.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
- tableLayoutPanel4.Controls.Add(hopeButton1, 0, 0);
- tableLayoutPanel4.Controls.Add(hopeButton2, 1, 0);
+ tableLayoutPanel4.Controls.Add(btnHisDataFind, 0, 0);
+ tableLayoutPanel4.Controls.Add(btnHisDataExport, 1, 0);
tableLayoutPanel4.Location = new Point(657, 509);
tableLayoutPanel4.Name = "tableLayoutPanel4";
tableLayoutPanel4.RowCount = 1;
@@ -294,43 +294,44 @@
tableLayoutPanel4.Size = new Size(200, 39);
tableLayoutPanel4.TabIndex = 1;
//
- // hopeButton1
+ // btnHisDataFind
//
- hopeButton1.BorderColor = Color.FromArgb(220, 223, 230);
- hopeButton1.ButtonType = ReaLTaiizor.Util.HopeButtonType.Primary;
- hopeButton1.DangerColor = Color.FromArgb(245, 108, 108);
- hopeButton1.DefaultColor = Color.FromArgb(255, 255, 255);
- hopeButton1.Font = new Font("Segoe UI", 12F);
- hopeButton1.HoverTextColor = Color.FromArgb(48, 49, 51);
- hopeButton1.InfoColor = Color.FromArgb(144, 147, 153);
- hopeButton1.Location = new Point(3, 3);
- hopeButton1.Name = "hopeButton1";
- hopeButton1.PrimaryColor = Color.FromArgb(64, 158, 255);
- hopeButton1.Size = new Size(94, 33);
- hopeButton1.SuccessColor = Color.FromArgb(103, 194, 58);
- hopeButton1.TabIndex = 0;
- hopeButton1.Text = "鏌ヨ";
- hopeButton1.TextColor = Color.White;
- hopeButton1.WarningColor = Color.FromArgb(230, 162, 60);
+ btnHisDataFind.BorderColor = Color.FromArgb(220, 223, 230);
+ btnHisDataFind.ButtonType = ReaLTaiizor.Util.HopeButtonType.Primary;
+ btnHisDataFind.DangerColor = Color.FromArgb(245, 108, 108);
+ btnHisDataFind.DefaultColor = Color.FromArgb(255, 255, 255);
+ btnHisDataFind.Font = new Font("Segoe UI", 12F);
+ btnHisDataFind.HoverTextColor = Color.FromArgb(48, 49, 51);
+ btnHisDataFind.InfoColor = Color.FromArgb(144, 147, 153);
+ btnHisDataFind.Location = new Point(3, 3);
+ btnHisDataFind.Name = "btnHisDataFind";
+ btnHisDataFind.PrimaryColor = Color.FromArgb(64, 158, 255);
+ btnHisDataFind.Size = new Size(94, 33);
+ btnHisDataFind.SuccessColor = Color.FromArgb(103, 194, 58);
+ btnHisDataFind.TabIndex = 0;
+ btnHisDataFind.Text = "鏌ヨ";
+ btnHisDataFind.TextColor = Color.White;
+ btnHisDataFind.WarningColor = Color.FromArgb(230, 162, 60);
//
- // hopeButton2
+ // btnHisDataExport
//
- hopeButton2.BorderColor = Color.FromArgb(220, 223, 230);
- hopeButton2.ButtonType = ReaLTaiizor.Util.HopeButtonType.Primary;
- hopeButton2.DangerColor = Color.FromArgb(245, 108, 108);
- hopeButton2.DefaultColor = Color.FromArgb(255, 255, 255);
- hopeButton2.Font = new Font("Segoe UI", 12F);
- hopeButton2.HoverTextColor = Color.FromArgb(48, 49, 51);
- hopeButton2.InfoColor = Color.FromArgb(144, 147, 153);
- hopeButton2.Location = new Point(103, 3);
- hopeButton2.Name = "hopeButton2";
- hopeButton2.PrimaryColor = Color.FromArgb(64, 158, 255);
- hopeButton2.Size = new Size(94, 33);
- hopeButton2.SuccessColor = Color.FromArgb(103, 194, 58);
- hopeButton2.TabIndex = 1;
- hopeButton2.Text = "瀵煎嚭";
- hopeButton2.TextColor = Color.White;
- hopeButton2.WarningColor = Color.FromArgb(230, 162, 60);
+ btnHisDataExport.BorderColor = Color.FromArgb(220, 223, 230);
+ btnHisDataExport.ButtonType = ReaLTaiizor.Util.HopeButtonType.Primary;
+ btnHisDataExport.DangerColor = Color.FromArgb(245, 108, 108);
+ btnHisDataExport.DefaultColor = Color.FromArgb(255, 255, 255);
+ btnHisDataExport.Font = new Font("Segoe UI", 12F);
+ btnHisDataExport.HoverTextColor = Color.FromArgb(48, 49, 51);
+ btnHisDataExport.InfoColor = Color.FromArgb(144, 147, 153);
+ btnHisDataExport.Location = new Point(103, 3);
+ btnHisDataExport.Name = "btnHisDataExport";
+ btnHisDataExport.PrimaryColor = Color.FromArgb(64, 158, 255);
+ btnHisDataExport.Size = new Size(94, 33);
+ btnHisDataExport.SuccessColor = Color.FromArgb(103, 194, 58);
+ btnHisDataExport.TabIndex = 1;
+ btnHisDataExport.Text = "瀵煎嚭";
+ btnHisDataExport.TextColor = Color.White;
+ btnHisDataExport.WarningColor = Color.FromArgb(230, 162, 60);
+ btnHisDataExport.Click += btnHisDataExport_Click;
//
// HistoricalDataEditPage
//
@@ -363,8 +364,8 @@
private TableLayoutPanel tableLayoutPanel3;
private DataGridView dataGridViewHD;
private TableLayoutPanel tableLayoutPanel4;
- private ReaLTaiizor.Controls.HopeButton hopeButton1;
- private ReaLTaiizor.Controls.HopeButton hopeButton2;
+ private ReaLTaiizor.Controls.HopeButton btnHisDataFind;
+ private ReaLTaiizor.Controls.HopeButton btnHisDataExport;
private TableLayoutPanel tableLayoutPanel5;
private Label labelSearchBasis;
private TableLayoutPanel tableLayoutPanelSN;
--
Gitblit v1.9.3