Esempio n. 1
0
        private static ITomatoTimer CreateTimerFromSettings()
        {
            // HACK: This Configuration Should be Managed By AppController
            var tomatoLen = Constants.TomatoTime;
            var breakLen = Constants.BreakTime;
            var setBreakLen = Constants.SetBreakTime;

            var dispatcherTimer = new Timer();
            var timer = new CoreTimer(new TimerComponent(dispatcherTimer, dispatcherTimer))
            {
                TomatoTimeSpan = tomatoLen,
                BreakTimeSpan = breakLen,
                SetBreakTimeSpan = setBreakLen
            };

            #if DEBUG
            var time = new TimeSpan(0, 0, 0, 10);
            timer.TomatoTimeSpan = time;
            timer.BreakTimeSpan = time;
            timer.SetBreakTimeSpan = time;
            #endif

            return timer;
        }
Esempio n. 2
0
        private static ITimer CreateTimerFromSettings()
        {
            // TODO: This Configuration Should be Managed By AppController
            // Load Timings from Configuration.
            var tomatoLen = Settings.Current.User.TomatoTime;
            var breakLen = Settings.Current.User.BreakTime;
            var setBreakLen = Settings.Current.User.SetBreakTime;

            var timer = new CoreTimer(new TimerComponent())
            {
                TomatoTimeSpan = new TimeSpan(0, 0, tomatoLen, 0),
                BreakTimeSpan = new TimeSpan(0, 0, breakLen, 0),
                SetBreakTimeSpan = new TimeSpan(0, 0, setBreakLen, 0)
            };

            #if DEBUG
            var time = new TimeSpan(0, 0, 0, 10);
            timer.TomatoTimeSpan = time;
            timer.BreakTimeSpan = time;
            timer.SetBreakTimeSpan = time;
            #endif

            return timer;
        }
 public BreakRunningState(CoreTimer coreTimer)
     : base(coreTimer)
 {
 }
Esempio n. 4
0
 public StoppedState(CoreTimer coreTimer)
     : base(coreTimer)
 {
 }
 public TomatoCompletedState(CoreTimer coreTimer)
     : base(coreTimer)
 {
 }
 public InterruptedState(CoreTimer coreTimer)
     : base(coreTimer)
 {
 }
 public TransitionClassBase(CoreTimer coreTimer)
     : base(coreTimer)
 {
 }