Ejemplo n.º 1
0
        public Program()
        {
            //InitializeComponent();
            var pomodoro = new Pomodoro(this, 2);

            pomodoro.Start();
        }
Ejemplo n.º 2
0
 public void GivenUnPomodoroIniciado()
 {
     var timer = new FakeTimer(null);
     var pomodoro = new Pomodoro(timer);
     SystemTime.Now = () => TestConstants.GeneralStartTime;
     pomodoro.Start();
     ScenarioContext.Current.Set(pomodoro);
     ScenarioContext.Current.Set(timer);
 }
Ejemplo n.º 3
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            Icon = Properties.Resources.Stopwatch;
            notifyIcon.Icon = Properties.Resources.Stopwatch;
            _dayTimer = new WorkDayTimer();
            _dayTimer.Tick += DayTimer_Tick;
            _pomodoro = new Pomodoro();
            _pomodoro.Tick += _pomodoro_Tick;

            clock.Interval = 1000;

            SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
            var settings = Settings.Default;
            if (settings.Date == DateTime.Today)
            {
                _pomodoro.LoadSettings(settings.TotalWork, settings.TotalPauze);
            }

            #if DEBUG
            sessionBox.Visible = true;
            sessionBox.Tag = true;
            sessionBox.Image = Properties.Resources.SecurityLock;
            #else
            #endif
            clock.Start();
            _pomodoro.Start();

            // Holy Crap!
            GC.Collect(); // as the form is minimized and not shown anyway, try to release as much VM as possible.
        }
Ejemplo n.º 4
0
        public Program()
        {
            var pomodoroTimer = new Pomodoro(this, 20);

            pomodoroTimer.Start();
        }
Ejemplo n.º 5
0
        public Program()
        {
            var pomodoro = new Pomodoro(this, 1);

            pomodoro.Start();
        }