private void BreakTimer(object source, EventArgs args) { clock.SecDecrement(); alarmWindow.printClock(clock); if (clock.GetAllSecs() == 0) { alarmWindow.Dispose(); alarmWindow = null; mainWindow.ShowAll(); ResetTimer(); UnsetAlarmTimer(); SetTimer(); } }
public void Alarm() { alarmWindow = new AlarmWindow(); alarmWindow.Show(); mainWindow.HideAll(); UnsetTimer(); SetAlarmTimer(); string alarmMessage = ""; if (options.alarmMessage == true) { alarmMessage = "The alarm time has been reached. Starting alarm..."; } options.alarm.Invoke(alarmMessage); }