private void TimerWarning_Tick(object sender, EventArgs e) { TimerWarning.Enabled = false; TimerWarning.Stop(); DisplayWarning(); SetTimerWarningInterval(); TimerWarning.Enabled = true; TimerWarning.Start(); }
/// <summary> /// Takes care for the time. Starts warning mode and turns off if needed. /// </summary> /// <param name="time"></param> private void HandleWarning(TimeSpan time) { if (time.Minutes == 0 && time.Seconds <= 5) { TimerWarning.Start(); } else { TimerWarning.Stop(); } }