| DevApp/Gs.WeightIqc/App.config | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.WeightIqc/Form1.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.WeightLine/App.config | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.WeightLine/Form1.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
DevApp/Gs.WeightIqc/App.config
@@ -5,7 +5,8 @@ </startup> <appSettings> <add key="WebApiUrl" value="http://192.168.1.145:81/" /> <add key="TimingMailInterval" value="10000" /> <add key="TimingMailInterval" value="1000" /> <add key="TimingMailIntervalStop" value="500" /> <add key="LogPath" value="logs" /> </appSettings> </configuration> 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); } } } DevApp/Gs.WeightLine/App.config
@@ -7,7 +7,9 @@ </configSections> <appSettings> <add key="WebApiUrl" value="http://192.168.1.145:81/" /> <add key="TimingMailInterval" value="10000" /> <add key="TimingMailInterval" value="1000" /> <add key="TimingMailIntervalStop" value="500" /> <add key="TimingMailIntervalGridView" value="5000" /> <add key="LogPath" value="logs" /> </appSettings> <applicationSettings> DevApp/Gs.WeightLine/Form1.cs
@@ -5,17 +5,14 @@ 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.WeightLine { @@ -27,19 +24,17 @@ private Form1.HandleInterfaceUpdataDelegate interfaceUpdataHandle; private Dictionary<string, Thread> dicThread = new Dictionary<string, Thread>(); private System.Windows.Forms.Timer timer1 = new System.Windows.Forms.Timer(); System.Timers.Timer timerGridview = new System.Timers.Timer(10000); int int32 = int.Parse(ConfigurationManager.AppSettings["TimingMailInterval"].ToString()); int int32Stop = int.Parse(ConfigurationManager.AppSettings["TimingMailIntervalStop"].ToString()); private static double int32GridView = double.Parse(ConfigurationManager.AppSettings["TimingMailIntervalGridView"].ToString()); System.Timers.Timer timerGridview = new System.Timers.Timer(int32GridView); public Form1() { InitializeComponent(); GetComList(); comLine.getSuppler(""); #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.comLine.IsReadly = false; @@ -270,11 +265,11 @@ } addModel(single.ToString(), int32.ToString()); 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); } } }