Example #1
0
        public void SaveRandomWorkout()
        {
            // Summary
            //
            // Saves selected workout to the DB then refreshes the list

            MongoHelper.AddWorkoutAsync(SelectedWorkout);

            ReadWorkouts();
        }
Example #2
0
        public void SaveCustomWorkout(object parameter)
        {
            // Summary
            //
            // Save Custom made workout

            if (parameter == null)
            {
                throw new ArgumentNullException();
            }

            (parameter as Workout).Length = Workout.GenerateLength(parameter as Workout);

            MongoHelper.AddWorkoutAsync(parameter as Workout);

            ReadWorkouts();

            BuildingWorkout             = false;
            CustomWorkout               = null;
            _customWorkoutExerciseCount = 0;
        }