领胜LDS 键盘AOI检测项目
xcd
2020-07-01 9d05b4e5a7b667afb6d13cbcb460e377c175c170
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;
                //}));
            }
        }
    }