/// <summary> /// Causes the GUI to recheck an alarm object for a state change and change appropriately /// /// The alarm must already have been added with AddAlarm /// </summary> /// <param name="alarm">The alarm object to check</param> /// <exception cref="AlarmNotSetException"> /// If the provided alarm was never used to create a row, this exception will be thrown /// </exception> public override void UpdateAlarm(Alarm alarm) { if (mainWindow == null && alarm.IsRinging) { mainWindow = new MainWindow(); mainWindow.Show(); } else if (mainWindow == null) { //no update if the alarm isn't ringing, it isn't pressing return; } AlarmRow row = this.GetAlarmRow(alarm); row.Update(); RenderAlarms(); }
/// <summary> /// Causes the GUI to recheck an alarm object for a state change and change appropriately /// /// The alarm must already have been added with AddAlarm /// </summary> /// <param name="alarm">The alarm object to check</param> /// <exception cref="AlarmNotSetException"> /// If the provided alarm was never used to create a row, this exception will be thrown /// </exception> public void UpdateAlarm(Alarm alarm) { AlarmRow row = this.GetAlarmRow(alarm); row.Update(); }