Example #1
0
        private void RestBetweenExercises()
        {
            _changeActivityTimer = new WorkoutCountDownTimer(_trainingModel.RestBetweenExercisesInterval.TotalMiliseconds(), 1000);
            TrainChangeEvent?.Invoke(this, new TrainChangeEventArgs()
            {
                State = State.LongRest,
                SecondsToNextMessage = _trainingModel.RestBetweenExercisesInterval.Seconds,
                MinutesToNextMessage = _trainingModel.RestBetweenExercisesInterval.Minutes
            });


            _changeActivityTimer.Tick     += SecondTick;
            _changeActivityTimer.Finished += RestBetweenExercisesTimerFinished;
            _changeActivityTimer.Start();
        }
Example #2
0
        public void StartWorkout()
        {
            _changeActivityTimer = new WorkoutCountDownTimer(_trainingModel.WorkInterval.TotalMiliseconds(), 1000);

            TrainChangeEvent?.Invoke(this, new TrainChangeEventArgs()
            {
                State = State.Work,
                SecondsToNextMessage = _trainingModel.WorkInterval.Seconds,
                MinutesToNextMessage = _trainingModel.WorkInterval.Minutes
            });

            _changeActivityTimer.Tick += SecondTick;
            _changeActivityTimer.Start();
            _changeActivityTimer.Finished += WorkoutTimerFinished;
        }