private void TeachingBtn_Click(object sender, RoutedEventArgs e) { if (TeachingSettingsBox.IsEnabled) { TeachingSettingsBox.IsEnabled = false; TeachingBtn.Content = "Stop"; // Error Graph Initialization ErrorGraph.PlotY(new double[] { 0 }); new Thread(_learningService.StartProcessing).Start(); } else { TeachingSettingsBox.IsEnabled = true; TeachingBtn.Content = "Start teaching"; _learningService.StopProcessing(); } }
private void Window_Closed(object sender, EventArgs e) { _learningService?.StopProcessing(); }