private void ConfirmClose(object sender, RoutedEventArgs e) { string text = ((ComboBoxItem)fatique_combo.SelectedItem).Content.ToString(); int fatique; if (text == "low") { fatique = 24; } else if (text == "medium") { fatique = 40; } else if (text == "high") { fatique = 56; } else { fatique = 72; } string squat_primary = ((ComboBoxItem)squat_primary_combo.SelectedItem).Content.ToString(); string bench_primary = ((ComboBoxItem)bench_primary_combo.SelectedItem).Content.ToString(); string deadlift_primary = ((ComboBoxItem)deadlift_primary_combo.SelectedItem).Content.ToString(); MainWorkouts main_workouts = new MainWorkouts(bench_primary, deadlift_primary, squat_primary); TrainingWeek new_week = new TrainingWeek(template_path, trainingBlock.GetBlockType(), fatique, main_workouts); trainingBlock.GetTrainingWeeks().Add(new_week); this.Close(); }
public AddWeek(TrainingBlock trainingBlock) { InitializeComponent(); this.trainingBlock = trainingBlock; block_type_text.Text = trainingBlock.GetBlockType() + " Block"; template_path = "templates//1_weekly_template.TEMPLATE"; }