public void ClosedSummaryPopUp(Boolean goToQuestions) { ExerciseWindow.Children.Remove(summary); summary = null; CurrentTraining.ClearTrainingData(); //if the user decided to answer the questions if (goToQuestions) { OpenQuestionnairePopUp(); } else { CloseExeciseView(); //CurrentTraining.ClearTrainingData(); //MainWindow.OpenTreatmentWindow(this.CurrentPatient); } }