| | |
| | | this.SizeChanged += new EventHandler(this.frmMain_SizeChanged); |
| | | this.contextMenuStrip1.ItemClicked += new ToolStripItemClickedEventHandler(this.contextMenuStrip1_ItemClicked); |
| | | this.Initialize(); |
| | | |
| | | } |
| | | |
| | | private void Initialize() |
| | |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | 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)); |
| | |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | | |