public StrengthSet(ExcerciseSet set) { InitializeComponent(); this.DataContext = set; }
public excercise(int ExcerciseId, ExcerciseSet Set) { Sets = new List<ExcerciseSet>(); Sets.Add(Set); ExcerciseID = ExcerciseId; excerciseName = Set.exercise_set.exercise_name; if (Set.exercise_set.set_type == "CardioSet") isCardioExcercise = true; else isCardioExcercise = false; if (isCardioExcercise) { distance = Set.exercise_set.distance; distanceUnits = Set.exercise_set.distance_unit; time = Set.exercise_set.time; timeUnit = Set.exercise_set.time_unit; } calories = Set.exercise_set.calories_burned; }
public void AddSet(ExcerciseSet Set) { Sets.Add(Set); calories += Set.exercise_set.calories_burned; if (isCardioExcercise) { distance += Set.exercise_set.distance; time += Set.exercise_set.time; } }
internal void AddExcerciseSet(ExcerciseSet set) { int exId = set.exercise_set.exercise_id; if (Excercises == null) Excercises = new Dictionary<int, excercise>(); if (!Excercises.ContainsKey(exId)) { excercise ex = new excercise(exId, set); Excercises.Add(exId, ex); } else Excercises[exId].AddSet(set); }