//Snooze the alarm public void SnoozeAlarm(int minutesToSnooze) { if (bgLowAlarmActive || bgHighAlarmActive) { SnoozeBgTimer.Interval = minutesToSnooze * 60000; bgLowAlarmActive = false; bgHighAlarmActive = false; alarm.alarmBgIsSnoozed = true; this.AlarmpictureBox.Hide(); SnoozeBgTimer.Start(); alarm.StopBgAlarm(); } if (missingBgAlarmActive || connectionError) { SnoozeMinutesSinceTimer.Interval = minutesToSnooze * 60000; missingBgAlarmActive = false; connectionError = false; connectionAlarmOn = false; alarm.alarmTimeIsSnoozed = true; this.AlarmpictureBox.Hide(); SnoozeMinutesSinceTimer.Start(); alarm.StopTimeAlarm(); } }
private void SnoozeMinutesSinceTimer_Tick(object sender, EventArgs e) { alarm.alarmTimeIsSnoozed = false; SnoozeMinutesSinceTimer.Stop(); TurnOnAlarm(BgLabel.Text); }