private void Button_Stop_Click(object sender, RoutedEventArgs e) { this.processInfoController.Stop(); this.processInfoController = null; this.Button_Stop.IsEnabled = false; this.Button_Start.IsEnabled = true; this.keep_plotting = false; this.childThread.Abort(); this.childThread = null; }
private void Button_Start_Click(object sender, RoutedEventArgs e) { string String_ProcessName; string String_ProcessOwner; string String_ProcessStart; String_ProcessName = ConfigurationManager.AppSettings.Get("ProcessName"); String_ProcessOwner = ConfigurationManager.AppSettings.Get("ProcessOwner"); String_ProcessStart = ConfigurationManager.AppSettings.Get("ProcessStart"); this.processInfoController = new ProcessInfoController(String_ProcessName, String_ProcessOwner, String_ProcessStart); this.Button_Stop.IsEnabled = true; this.Button_Start.IsEnabled = false; this.keep_plotting = true; this.childThread = new Thread(this.childref); this.childThread.Start(); }