private void Form1_Load(object sender, EventArgs e) { Microbreak.InitializeSettings(); PopulateControlsUnderSettingsTab(); PopulateControlsUnderAboutTab(); Microbreak.SetTimeOfNextBreak(this); }
private void timerMicrobreak_Tick(object sender, EventArgs e) { if (Microbreak.TimeForABreak()) { BreakStart(); } UpdateTimeUntilNextBreak(); }
private void ResetCountdownToNextBreak() { Microbreak.SetTimeOfNextBreak(this); if (formReminder != null) { formReminder.Close(); } }
private void BreakStart() { buttonBreakNow.Enabled = false; Microbreak.SetEndOfCurrentBreak(); formReminder = new FormReminder(this); formReminder.Show(); Microbreak._microbreakInProgress = true; timerMicrobreak.Stop(); }
private void timerMicrobreakDuration_Tick(object sender, EventArgs e) { if (Microbreak.endOfCurrentBreak <= DateTime.Now) { Microbreak.PlayASoundAtEndOfBreak(); Microbreak.SetTimeOfNextBreak(form1); Close(); } UpdateRemainingBreakTime(); }
private void numericUpDownPostponeBreakBy_ValueChanged(object sender, EventArgs e) { Properties.Settings.Default.PostponeMicrobreakInMinutes = Convert.ToDouble(numericUpDownPostponeBreakBy.Value); Properties.Settings.Default.Save(); Microbreak.InitializeSettings(); }
private void numericUpDownIntervalBetweenBreaks_ValueChanged(object sender, EventArgs e) { Properties.Settings.Default.IntervalBetweenMicrobreaksInMins = Convert.ToDouble(numericUpDownIntervalBetweenBreaks.Value); Properties.Settings.Default.Save(); Microbreak.InitializeSettings(); }
private void UpdateTimeUntilNextBreak() { var timeUntilBreak = Microbreak.TimeUntilNextBreak(); labelTimeUntilNextBreak.Text = string.Format("{0}:{1}", timeUntilBreak.ToString("mm"), timeUntilBreak.ToString("ss")); }
private void textBoxlocationOfWavFileToPlayAtEndOfBreak_TextChanged(object sender, EventArgs e) { Properties.Settings.Default.LocationOfWavFileToPlayAtEndOfBreak = textBoxlocationOfWavFileToPlayAtEndOfBreak.Text; Properties.Settings.Default.Save(); Microbreak.InitializeSettings(); }
private void checkBoxPlaySoundAtEndOfBreak_CheckedChanged(object sender, EventArgs e) { Properties.Settings.Default.PlaySoundAtEndOfBreak = checkBoxPlaySoundAtEndOfBreak.Checked; Properties.Settings.Default.Save(); Microbreak.InitializeSettings(); }
private void checkBoxResetBreakOnWorkstationUnlock_CheckedChanged(object sender, EventArgs e) { Properties.Settings.Default.ResetBreakOnWorkstationUnlock = checkBoxResetBreakOnWorkstationUnlock.Checked; Properties.Settings.Default.Save(); Microbreak.InitializeSettings(); }
private void UpdateRemainingBreakTime() { var timeRemainingOfCurrentBreak = Microbreak.TimeRemainingOfCurrentBreak(); labelBreakTimeRemaining.Text = string.Format("{0}:{1}", timeRemainingOfCurrentBreak.ToString("mm"), timeRemainingOfCurrentBreak.ToString("ss")); }
private void buttonSkipBreak_Click(object sender, EventArgs e) { Microbreak.SetTimeOfNextBreak(form1); Close(); }
private void buttonPostponeBreak_Click(object sender, EventArgs e) { Microbreak.PostponeBreak(form1); Close(); }
private void FormReminder_Load(object sender, EventArgs e) { timerMicrobreakDuration.Start(); Microbreak.PlayASoundAtStartOfBreak(); form1.MinimizeForm(); }