private void btnSuperSets_Click(object sender, RoutedEventArgs e) { TrainingPlanSuperSetsEditor wnd = new TrainingPlanSuperSetsEditor(); wnd.Fill(Context.Item); if (wnd.ShowDialog() == true) { viewModel.SetModifiedFlag(); } }
private void tbMoveUp_Click(object sender, RoutedEventArgs e) { var selItem = (IRepositionableChild)tvDetails.SelectedItem; IRepositionableChild selectedDay = selItem; if (selectedDay != null && ((TrainingPlanTreeItemViewModel)selectedDay).CanMoveUp) { selectedDay.RepositionableParent.RepositionEntry(selectedDay.Position, selectedDay.Position - 1); viewModel.SetModifiedFlag(); updateToolbar(); } }
private void cmbExercises_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (cmbExercises.SelectedValue == null) { return; } var oldCardio = entry.Entry.Exercise == null || entry.Entry.Exercise.ExerciseType == ExerciseType.Cardio; entry.Entry.Exercise = (ExerciseLightDTO)cmbExercises.SelectedValue; var newCardio = entry.Entry.Exercise.ExerciseType == ExerciseType.Cardio; if (oldCardio != newCardio) { entry.Entry.Sets.Clear(); entry.Sets.Clear(); } viewModel.SetModifiedFlag(); if (TrainingPlanChanged != null) { TrainingPlanChanged(this, new ParameterEventArgs <TrainingPlanEntry>(entry.Entry)); } }
private void cmbSet_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { viewModel.SetModifiedFlag(); }