From c36373bf842b43df04758bd6f5a4201eaae6fe4c Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期三, 15 十月 2025 10:12:39 +0800
Subject: [PATCH] 称重

---
 DevApp/Gs.WeightIqc/Form1.cs |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/DevApp/Gs.WeightIqc/Form1.cs b/DevApp/Gs.WeightIqc/Form1.cs
index 6586897..71c88c9 100644
--- a/DevApp/Gs.WeightIqc/Form1.cs
+++ b/DevApp/Gs.WeightIqc/Form1.cs
@@ -5,17 +5,12 @@
 using NModbus.Serial;
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Configuration;
-using System.Data;
-using System.Drawing;
 using System.IO.Ports;
 using System.Linq;
-using System.Text;
 using System.Threading;
-using System.Threading.Tasks;
 using System.Windows.Forms;
-using static System.Windows.Forms.VisualStyles.VisualStyleElement;
+
 
 namespace Gs.WeightIqc
 {
@@ -26,16 +21,15 @@
         private Form1.HandleInterfaceUpdataDelegate interfaceUpdataHandle;
         private Dictionary<string, Thread> dicThread = new Dictionary<string, Thread>();
         private System.Windows.Forms.Timer timer1 = new System.Windows.Forms.Timer();
+        int int32 = int.Parse(ConfigurationManager.AppSettings["TimingMailInterval"].ToString());
+        int int32Stop = int.Parse(ConfigurationManager.AppSettings["TimingMailIntervalStop"].ToString());
         public Form1()
         {
             InitializeComponent();
             GetComList();
             #region MyRegion
             int int32 = 10000;
-            string _vanishingSeconds = ConfigurationManager.AppSettings["TimingMailInterval"];
-            if (!string.IsNullOrEmpty(_vanishingSeconds))
-                int32 = int.Parse(_vanishingSeconds);
-            this.timer1.Interval = int32;
+            this.timer1.Interval = int32;//姣忛殧閰嶇疆绉掕涓�娆$О閲�
             this.button1.Enabled = true;
             this.button2.Enabled = false;
             this.cmbBaudRate.SelectedIndex = 1;
@@ -191,11 +185,11 @@
                     }
                     addModel(single.ToString(), int32.ToString());
                     ToolBox.LogHelper.Debug(this.ToString(), "single:" + single.ToString() + ",flag:" + flag.ToString() + ",int32:" + int32.ToString());
-                    Thread.Sleep(2000);
+                    Thread.Sleep(int32Stop);
                 }
                 catch (Exception ex)
                 {
-                    Thread.Sleep(2000);
+                    Thread.Sleep(int32Stop);
                 }
             }
         }

--
Gitblit v1.9.3