From 5b0449ff5412bfd192e518ce4ad919c47e6ea65a Mon Sep 17 00:00:00 2001 From: wells.liu <wells.liu@broconcentric.com> Date: 星期二, 30 六月 2020 11:15:53 +0800 Subject: [PATCH] Merge branch 'master' of http://gitblit.broconcentric.com:8088/r/M071 --- src/Bro.UI.Config/MenuForms/FrmOperation.cs | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Bro.UI.Config/MenuForms/FrmOperation.cs b/src/Bro.UI.Config/MenuForms/FrmOperation.cs index 74ba196..9175789 100644 --- a/src/Bro.UI.Config/MenuForms/FrmOperation.cs +++ b/src/Bro.UI.Config/MenuForms/FrmOperation.cs @@ -140,10 +140,12 @@ btnStart.Enabled = false; + //Task.Run(() => + //{ try { //if (Process.ProcessState != EnumHelper.DeviceState.DSOpen) - if(isStart) + if (isStart) { ProcessOperation(true); } @@ -160,8 +162,9 @@ } finally { - btnStart.Enabled = true; + this.BeginInvoke(new Action(() => btnStart.Enabled = true)); } + //}); } string _currentProcssCode = ""; @@ -248,21 +251,28 @@ { Process.Open(); + //this.BeginInvoke(new Action(() => + //{ btnStart.Text = " 鍋� 姝�"; btnStart.ImageIndex = 1; btnStart.BackColor = Color.FromArgb(0x7f, Color.LimeGreen); btnLoad.Enabled = false; + //})); + } else { Process.Close(); + //this.BeginInvoke(new Action(() => + //{ btnStart.Text = " 鍚� 鍔�"; btnStart.ImageIndex = 0; btnStart.BackColor = SystemColors.Control; btnLoad.Enabled = true; + //})); } } } -- Gitblit v1.8.0