From e9f47e76b9932949c9df829e98b09938eb93e870 Mon Sep 17 00:00:00 2001 From: wells.liu <wells.liu@broconcentric.com> Date: 星期三, 01 七月 2020 17:53:09 +0800 Subject: [PATCH] 完成 板卡警报+监听功能 --- 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