public void RemoveAlarm(StateDurationInfo durationInfo)
 {
     try
     {
         var panel = durationInfo.AlarmIconPanel;
         if (panel != null)
         {
             GridAlarmPanel.Children.Remove(panel);
         }
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }
 public void AddAlarm(StateDurationInfo durationInfo, StateAlarmInfo alarmInfo)
 {
     try
     {
         UCAlarmIconPanel uc = new UCAlarmIconPanel();
         uc.CurrentApp        = CurrentApp;
         uc.StateDurationInfo = durationInfo;
         uc.StateAlarmInfo    = alarmInfo;
         GridAlarmPanel.Children.Add(uc);
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }