private void AddAlarmMessage()
 {
     try
     {
         UCAlarmInfoModify uc = new UCAlarmInfoModify();
         uc.IsModify            = false;
         uc.CurrentApp          = CurrentApp;
         uc.PageParent          = this;
         uc.ListAgentStateInfos = mListAgentStateInfos;
         PopupPanel.Title       = string.Format("Add Alarm Message");
         PopupPanel.Content     = uc;
         PopupPanel.IsOpen      = true;
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }
 private void ModifyAlarmMessage()
 {
     try
     {
         var item = ListViewAlarmList.SelectedItem as AlarmMessageItem;
         if (item == null)
         {
             return;
         }
         UCAlarmInfoModify uc = new UCAlarmInfoModify();
         uc.IsModify            = true;
         uc.CurrentApp          = CurrentApp;
         uc.AlarmItem           = item;
         uc.PageParent          = this;
         uc.ListAgentStateInfos = mListAgentStateInfos;
         PopupPanel.Title       = string.Format("Modify Alarm Message");
         PopupPanel.Content     = uc;
         PopupPanel.IsOpen      = true;
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }