void GoToMainMenuButton_Click(object sender, RoutedEventArgs e) { stopButton.Click += stopButton_Click; reportStopButton.Click += reportStopButton_Click; logStopButton.Click += logStopButton_Click; if (parent.rulesAnalyzer.interruption) { parent.rulesAnalyzer.makeLog(); } myCanvas.Children.Remove(interruptFeedback); interruptFeedback = null; reportFeedback = null; myState = currentState.play; parent.freeStyleMode_reportStopButton_Click(null, null); }
void ContinueButton_Click(object sender, RoutedEventArgs e) { reportFeedback.ContinueButton.Click -= ContinueButton_Click; stopButton.Click += stopButton_Click; reportStopButton.Click += reportStopButton_Click; logStopButton.Click += logStopButton_Click; myCanvas.Children.Remove(reportFeedback); reportFeedback = null; myState = currentState.play; if (parent.rulesAnalyzer.interruption) { parent.rulesAnalyzer.interrupted = false; //parent.rulesAnalyzer.reset(); } }
public void loadReport() { myState = currentState.stop; reportFeedback = new ReportFeedback(); myCanvas.Children.Add(reportFeedback); Canvas.SetLeft(reportFeedback, 300); Canvas.SetTop(reportFeedback, 20); reportFeedback.ContinueButton.Click += ContinueButton_Click; reportFeedback.GoToMainMenuButton.Click += GoToMainMenuButton_Click; stopButton.Click -= stopButton_Click; reportStopButton.Click -= reportStopButton_Click; logStopButton.Click -= logStopButton_Click; }