private void NextExerciseButton_Click(object sender, RoutedEventArgs e) { ExerciseWindow nextExerciseWindow = new ExerciseWindow(_user, _exerciseNumber + 1, _isOpenedFromModuleWindow); nextExerciseWindow.Show(); this.Close(); }
private void ExerciseButton_Click(object sender, RoutedEventArgs e) { if (int.TryParse((sender as Button)?.Content.ToString().Replace(GlobalVariables.exerciseNumberPartialText, ""), out int exerciseNumber)) { ExerciseWindow exerciseWindow = new ExerciseWindow(_user, exerciseNumber, _isOpenedFromModuleWindow); exerciseWindow.Show(); this.Close(); } }