public Program() { //InitializeComponent(); var pomodoro = new Pomodoro(this, 2); pomodoro.Start(); }
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); }
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. }
public Program() { var pomodoroTimer = new Pomodoro(this, 20); pomodoroTimer.Start(); }
public Program() { var pomodoro = new Pomodoro(this, 1); pomodoro.Start(); }