Esempio n. 1
0
 public StrengthSet(ExcerciseSet set)
 {
     InitializeComponent();
     this.DataContext = set;
 }
Esempio n. 2
0
        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;

        }
Esempio n. 3
0
        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;
            }
        }
Esempio n. 4
0
        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);
        }