| | |
| | | |
| | | btnStart.Enabled = false; |
| | | |
| | | //Task.Run(() => |
| | | //{ |
| | | try |
| | | { |
| | | //if (Process.ProcessState != EnumHelper.DeviceState.DSOpen) |
| | | if(isStart) |
| | | if (isStart) |
| | | { |
| | | ProcessOperation(true); |
| | | } |
| | |
| | | } |
| | | finally |
| | | { |
| | | btnStart.Enabled = true; |
| | | this.BeginInvoke(new Action(() => btnStart.Enabled = true)); |
| | | } |
| | | //}); |
| | | } |
| | | |
| | | string _currentProcssCode = ""; |
| | |
| | | { |
| | | 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; |
| | | //})); |
| | | } |
| | | } |
| | | } |