From eeb7cf6accb95c32216edaf8a5cf14a1c64493b2 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期四, 21 八月 2025 20:22:37 +0800
Subject: [PATCH] bug

---
 DevApp/Gs.DevApp/DevFrm/QC/WeightIqc.cs |   31 +++++++++++++++++--------------
 1 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/QC/WeightIqc.cs b/DevApp/Gs.DevApp/DevFrm/QC/WeightIqc.cs
index 69ddbf2..fc28335 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/WeightIqc.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/WeightIqc.cs
@@ -74,7 +74,6 @@
             this.SizeChanged += new EventHandler(this.frmMain_SizeChanged);
             this.contextMenuStrip1.ItemClicked += new ToolStripItemClickedEventHandler(this.contextMenuStrip1_ItemClicked);
             this.Initialize();
- 
         }
 
         private void Initialize()
@@ -94,8 +93,9 @@
             }
             catch (Exception ex)
             {
-                int num = (int)MessageBox.Show(ex.Message);
-                Application.Exit();
+                //int num = (int)MessageBox.Show(ex.Message);
+                //Application.Exit();
+                MsgHelper.ShowError("Initialize:" + ex.Message);
             }
         }
 
@@ -193,7 +193,8 @@
             catch (Exception ex)
             {
                 LoggerHelper.WriteErrorLog($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}:{ex.Message}");
-                int num = (int)MessageBox.Show(ex.Message);
+               // int num = (int)MessageBox.Show(ex.Message);
+                MsgHelper.ShowError("UpdateTextBox:" + ex.Message);
             }
         }
 
@@ -281,19 +282,20 @@
             }
             catch (Exception ex)
             {
-                int num = (int)MessageBox.Show(ex.Message);
-                Application.Exit();
+                //int num = (int)MessageBox.Show(ex.Message);
+                //Application.Exit();
+                MsgHelper.ShowError(ex.Message);
             }
         }
 
         private void timer1_Tick(object sender, EventArgs e)
         {
-            if (!this.dicThread.Keys.Contains<string>("RefreshData"))
-            {
-                Thread thread = new Thread(new ThreadStart(this.RefreshData));
-                thread.Start();
-                this.dicThread.Add("RefreshData", thread);
-            }
+            //if (!this.dicThread.Keys.Contains<string>("RefreshData"))
+            //{
+            //    Thread thread = new Thread(new ThreadStart(this.RefreshData));
+            //    thread.Start();
+            //    this.dicThread.Add("RefreshData", thread);
+            //}
             if (this.dicThread.Keys.Contains<string>("GetWeight"))
                 return;
             Thread thread1 = new Thread(new ThreadStart(this.GetWeight));
@@ -331,8 +333,9 @@
             }
             catch (Exception ex)
             {
-                int num = (int)MessageBox.Show(ex.Message);
-                Application.Exit();
+                //int num = (int)MessageBox.Show(ex.Message);
+                //Application.Exit();
+                MsgHelper.ShowError(ex.Message);
             }
         }
 

--
Gitblit v1.9.3