public void Reset()
        {
            RemainingTime.CopyFrom(attachedTabata.CompleteLength);
            RemainingPhaseTime.CopyFrom(attachedTabata.PreparationLength);
            WholePhaseTime.CopyFrom(attachedTabata.PreparationLength);
            CurrentState          = State.Preparation;
            CurrentRoundNumber    = 0;
            CurrentExerciseNumber = 0;
            playTimer.Stop();

            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(StateChangedEventName));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(RoundChangedEventName));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(ExerciceChangedEventName));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(TimeChangedEventName));
        }
        private void Update()
        {
            RemainingPhaseTime.RemoveSeconds(1);
            RemainingTime.RemoveSeconds(1);

            switch (CurrentState)
            {
            case State.Preparation:
                if (RemainingPhaseTime.TotalSeconds == 0)
                {
                    CurrentRoundNumber    = 1;
                    CurrentExerciseNumber = 1;
                    CurrentState          = State.Work;
                    RemainingPhaseTime.CopyFrom(attachedTabata.WorkLength);
                    WholePhaseTime.CopyFrom(attachedTabata.WorkLength);
                    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(StateChangedEventName));
                }
                else if (RemainingPhaseTime.TotalSeconds == 3)
                {
                    AudioHelper.PlayStarting();
                }
                break;

            case State.Work:
                if (RemainingPhaseTime.TotalSeconds == 0)
                {
                    AudioHelper.PlayFinishBell();
                    if ((CurrentRoundNumber) == attachedTabata.RoundCount)
                    {
                        RemainingPhaseTime.CopyFrom(attachedTabata.RestBetweenRoundLength);
                        WholePhaseTime.CopyFrom(attachedTabata.RestBetweenRoundLength);
                        CurrentState = State.RestBetweenRound;
                    }
                    else if ((CurrentExerciseNumber) == attachedTabata.ExerciseCount)
                    {
                        CurrentState = State.Finish;
                        playTimer.Stop();
                    }
                    else
                    {
                        CurrentState = State.Rest;
                        RemainingPhaseTime.CopyFrom(attachedTabata.RestLength);
                        WholePhaseTime.CopyFrom(attachedTabata.RestLength);
                    }

                    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(StateChangedEventName));
                }

                if (RemainingPhaseTime.TotalSeconds < 5)
                {
                    AudioHelper.PlayAlmostFinishBell();
                }

                break;

            case State.Rest:
                if (RemainingPhaseTime.TotalSeconds == 0)
                {
                    CurrentRoundNumber++;
                    RemainingPhaseTime.CopyFrom(attachedTabata.WorkLength);
                    WholePhaseTime.CopyFrom(attachedTabata.WorkLength);
                    CurrentState = State.Work;
                    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(StateChangedEventName));
                    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(RoundChangedEventName));
                }
                break;

            case State.RestBetweenRound:
                if (RemainingPhaseTime.TotalSeconds == 0)
                {
                    RemainingPhaseTime.CopyFrom(attachedTabata.WorkLength);
                    WholePhaseTime.CopyFrom(attachedTabata.WorkLength);
                    CurrentExerciseNumber++;
                    CurrentState = State.Work;

                    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(StateChangedEventName));
                    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(ExerciceChangedEventName));
                }
                break;

            default:
                Debug.Assert(true, $"Should not be here for {CurrentState}");
                break;
            }

            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(TimeChangedEventName));
        }