Exemplo n.º 1
0
        private TimeSpan getTimeSpan(PomodoroTimeSpanType spanType)
        {
            switch (spanType)
            {
                case PomodoroTimeSpanType.FullPomodoro:
                default:
                    return new TimeSpan(0,25,0);

                case PomodoroTimeSpanType.LongBreak:
                    return  new TimeSpan(0, 10, 0);

                case PomodoroTimeSpanType.ShortBreak:
                    return new TimeSpan(0, 5, 0);

            }
        }
Exemplo n.º 2
0
 public void Start(PomodoroTimeSpanType spanType)
 {
     _currentType = spanType;
     _timeRemaining = getTimeSpan(spanType);
     _timer.Interval = _tickInterval.TotalMilliseconds;
     OnPropertyChanged("TimeRemaining");
     _timer.Start();
 }