Example #1
0
 public void Dispose()
 {
     _window     = null;
     _publishers = null;
     _workTimer.Dispose();
     _restTimer.Dispose();
 }
Example #2
0
        public AppController(Pomodo7oWindow window, IEnumerable <IPomodoroPublisher> publishers)
        {
            _window             = window;
            _window.Play       += Start;
            _window.Reset      += Reset;
            _window.Pause      += Pause;
            _window.GoToWork   += GoToWork;
            _window.TakeABreak += TakeABreak;
            _window.Loaded     += (s, e) => GoToWork();

            _publishers = publishers;

            _workTimer = new TomatoTimer(25.Minutes());
            _restTimer = new TomatoTimer(5.Minutes());

            _workTimer.TickPct       += pct => Notify(x => x.WorkPercent(pct));
            _workTimer.TickRemaining += rmn => Notify(x => x.WorkTimeLeft(rmn));
            _workTimer.Complete      += () =>
            {
                Notify(x => x.WorkComplete());
                TakeABreak();
            };

            _restTimer.TickPct       += pct => Notify(x => x.RestPercent(pct));
            _restTimer.TickRemaining += rmn => Notify(x => x.RestTimeLeft(rmn));
            _restTimer.Complete      += () =>
            {
                Notify(x => x.RestComplete());
                GoToWork();
            };
        }
Example #3
0
 public void Dispose()
 {
     _window = null;
     _publishers = null;
     _workTimer.Dispose();
     _restTimer.Dispose();
 }
Example #4
0
        public AppController(Pomodo7oWindow window, IEnumerable<IPomodoroPublisher> publishers)
        {
            _window = window;
            _window.Play += Start;
            _window.Reset += Reset;
            _window.Pause += Pause;
            _window.GoToWork += GoToWork;
            _window.TakeABreak += TakeABreak;
            _window.Loaded += (s, e) => GoToWork();

            _publishers = publishers;

            _workTimer = new TomatoTimer(25.Minutes());
            _restTimer = new TomatoTimer(5.Minutes());

            _workTimer.TickPct += pct => Notify(x => x.WorkPercent(pct));
            _workTimer.TickRemaining += rmn => Notify(x => x.WorkTimeLeft(rmn));
            _workTimer.Complete += () =>
                                      {
                                          Notify(x => x.WorkComplete());
                                          TakeABreak();
                                      };

            _restTimer.TickPct += pct => Notify(x => x.RestPercent(pct));
            _restTimer.TickRemaining += rmn => Notify(x => x.RestTimeLeft(rmn));
            _restTimer.Complete += () =>
                                      {
                                          Notify(x => x.RestComplete());
                                          GoToWork();
                                      };
        }
 public MainWindowTitlePublisher(Pomodo7oWindow window)
 {
     _window = window;
     _baseTitle = _window.Title;
     _mode = null;
     _isPaused = false;
 }
Example #6
0
 public TaskbarProgressBar(ITaskbarManager manager, Pomodo7oWindow handle)
 {
     _manager = manager;
     _handle  = handle;
 }
 public TaskbarProgressBar(ITaskbarManager manager, Pomodo7oWindow handle)
 {
     _manager = manager;
     _handle = handle;
 }