public void RestartDevice() { if (!dtwork.RestartDevice(Constant.AutoPage)) { MessageBox.Show(Constant.ConnectMachineFail); Environment.Exit(0); } }
private void connectMachine_Click(object sender, EventArgs e) { UpdateTimer.Enabled = false; if (evokWork.RestartDevice(tc1.SelectedIndex)) { InitControl(); UpdateTimer.Enabled = true; } else { MessageBox.Show(Constant.ConnectMachineFail); } }