From 48b6e81901ce92eecffaaf5afea5ebad2b335513 Mon Sep 17 00:00:00 2001 From: xyy <544939200@qq.com> Date: Tue, 3 Feb 2026 11:14:27 +0800 Subject: [PATCH] --- Program.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Program.cs b/Program.cs index a8003ff..2c8fd71 100644 --- a/Program.cs +++ b/Program.cs @@ -23,8 +23,8 @@ namespace P_RTU_TEST_WinForm private IModbusMaster _master; private TcpClient _client = new TcpClient(); // 在类开头部分添加 - private string _productModel = ""; // 存储产品型号 - private TextBox txtProductModel; // 产品型号输入框 + private string _productModel = ""; // 存储产品批号 + private TextBox txtProductModel; // 产品批号输入框 // 在类开头部分添加 private int _calculationCount = 1; // 默认计算1次 @@ -54,10 +54,10 @@ namespace P_RTU_TEST_WinForm InitializeComponent(); - // 添加产品型号标签和输入框 + // 添加产品批号标签和输入框 Label lblProductModel = new Label() { - Text = "产品型号:", + Text = "产品批号:", Location = new Point(366, 15), Size = new Size(68, 15) }; @@ -596,7 +596,7 @@ namespace P_RTU_TEST_WinForm return; } - // 获取产品型号 + // 获取产品批号 string productModel = string.IsNullOrWhiteSpace(txtProductModel.Text) ? "未命名产品" : txtProductModel.Text.Trim(); @@ -626,7 +626,7 @@ namespace P_RTU_TEST_WinForm { sw.WriteLine("=== 测试报表 ==="); sw.WriteLine($"生成时间: {DateTime.Now:yyyy-MM-dd HH:mm:ss}"); - sw.WriteLine($"产品型号: {productModel}"); + sw.WriteLine($"产品批号: {productModel}"); sw.WriteLine($"测试时间: {txtTestTime.Text} 秒"); sw.WriteLine($"计算次数: 1 次"); sw.WriteLine($"数据总数: {_distanceValues.Count}"); @@ -656,7 +656,7 @@ namespace P_RTU_TEST_WinForm return; } - // 获取产品型号 + // 获取产品批号 string productModel = string.IsNullOrWhiteSpace(txtProductModel.Text) ? "未命名产品" : txtProductModel.Text.Trim(); @@ -684,7 +684,7 @@ namespace P_RTU_TEST_WinForm { sw.WriteLine("=== 多次测试报表 ==="); sw.WriteLine($"生成时间: {DateTime.Now:yyyy-MM-dd HH:mm:ss}"); - sw.WriteLine($"产品型号: {productModel}"); + sw.WriteLine($"产品批号: {productModel}"); sw.WriteLine($"单次测试时间: {txtTestTime.Text} 秒"); sw.WriteLine($"计算次数: {_calculationCount} 次"); sw.WriteLine($"总数据量: {_allTestResults.Sum(list => list.Count)}");