private int CalculateExerciseTotalSets(EtypeOfExercise exerciseType)
        {
            int totalSets = 0;

            if (exerciseType == EtypeOfExercise.MachineExercise)
            {
                for (int outer_it = 0; outer_it < m_registeredTrainingsDays.Count; outer_it++)
                {
                    for (int inner_it = 0; inner_it < m_registeredTrainingsDays[outer_it].ExercisesOfTheDay.Count; inner_it++)
                    {
                        if (m_registeredTrainingsDays[outer_it].ExercisesOfTheDay[inner_it] is MachineExcercise)
                        {
                            MachineExcercise tempExercise = m_registeredTrainingsDays[outer_it].ExercisesOfTheDay[inner_it] as MachineExcercise;

                            if (tempExercise != null)
                            {
                                //detects overflow
                                checked
                                {
                                    totalSets += tempExercise.AmountOfSets;
                                }
                            }
                        }
                    }
                }
            }
            else if (exerciseType == EtypeOfExercise.BodyWeightExercise)
            {
                for (int outer_it = 0; outer_it < m_registeredTrainingsDays.Count; outer_it++)
                {
                    for (int inner_it = 0; inner_it < m_registeredTrainingsDays[outer_it].ExercisesOfTheDay.Count; inner_it++)
                    {
                        if (m_registeredTrainingsDays[outer_it].ExercisesOfTheDay[inner_it] is BodyWeightExercise)
                        {
                            BodyWeightExercise tempExercise = m_registeredTrainingsDays[outer_it].ExercisesOfTheDay[inner_it] as BodyWeightExercise;

                            if (tempExercise != null)
                            {
                                //detects overflow
                                checked
                                {
                                    totalSets += tempExercise.AmountOfSets;
                                }
                            }
                        }
                    }
                }
            }

            return(totalSets);
        }
        private string FindMostTrainedExercise(EtypeOfExercise exerciseType)
        {
            string mostTrainedExercise = "Not trained yet";
            int    timesTrained        = 0;
            int    temp = 0;

            if (exerciseType == EtypeOfExercise.MachineExercise)
            {
                for (int outer_it = 0; outer_it < m_registeredTrainingsDays.Count; outer_it++)
                {
                    for (int inner_it = 0; inner_it < m_registeredTrainingsDays[outer_it].ExercisesOfTheDay.Count; inner_it++)
                    {
                        if (m_registeredTrainingsDays[outer_it].ExercisesOfTheDay[inner_it] is MachineExcercise)
                        {
                            MachineExcercise tempExercise = m_registeredTrainingsDays[outer_it].ExercisesOfTheDay[inner_it] as MachineExcercise;

                            if (tempExercise != null)
                            {
                                timesTrained = getHowManyTimesTrained(tempExercise.ExerciseName);
                                if (timesTrained > temp)
                                {
                                    mostTrainedExercise = tempExercise.ExerciseName;
                                    temp = timesTrained;
                                }
                            }
                        }
                    }
                }
            }
            else if (exerciseType == EtypeOfExercise.CardioExercise)
            {
                for (int outer_it = 0; outer_it < m_registeredTrainingsDays.Count; outer_it++)
                {
                    for (int inner_it = 0; inner_it < m_registeredTrainingsDays[outer_it].ExercisesOfTheDay.Count; inner_it++)
                    {
                        if (m_registeredTrainingsDays[outer_it].ExercisesOfTheDay[inner_it] is CardioExercise)
                        {
                            CardioExercise tempExercise = m_registeredTrainingsDays[outer_it].ExercisesOfTheDay[inner_it] as CardioExercise;

                            if (tempExercise != null)
                            {
                                timesTrained = getHowManyTimesTrained(tempExercise.ExerciseName);
                                if (timesTrained > temp)
                                {
                                    mostTrainedExercise = tempExercise.ExerciseName;
                                    temp = timesTrained;
                                }
                            }
                        }
                    }
                }
            }
            else if (exerciseType == EtypeOfExercise.BodyWeightExercise)
            {
                for (int outer_it = 0; outer_it < m_registeredTrainingsDays.Count; outer_it++)
                {
                    for (int inner_it = 0; inner_it < m_registeredTrainingsDays[outer_it].ExercisesOfTheDay.Count; inner_it++)
                    {
                        if (m_registeredTrainingsDays[outer_it].ExercisesOfTheDay[inner_it] is BodyWeightExercise)
                        {
                            BodyWeightExercise tempExercise = m_registeredTrainingsDays[outer_it].ExercisesOfTheDay[inner_it] as BodyWeightExercise;

                            if (tempExercise != null)
                            {
                                timesTrained = getHowManyTimesTrained(tempExercise.ExerciseName);
                                if (timesTrained > temp)
                                {
                                    mostTrainedExercise = tempExercise.ExerciseName;
                                    temp = timesTrained;
                                }
                            }
                        }
                    }
                }
            }
            else if (exerciseType == EtypeOfExercise.BodyWeightExercise)
            {
                throw new NotImplementedException();
            }

            return(mostTrainedExercise);
        }
        //TODO diese add methoden sollten auch die werte der Übung enthalten wie die wiederholungen und gewichte....

        public void addMachineExcercise(string trainingName, string comment, ExerciseSet[] excerciseSet)
        {
            MachineExcercise machineExcercise = new MachineExcercise(trainingName, comment, excerciseSet);

            m_exercisesOfTheDay.Add(machineExcercise);
        }