예제 #1
0
 /// <summary>
 /// 新規作成ボタンのクリックイベント
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void AddButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         ScheduleSettingWindow form = new ScheduleSettingWindow();
         Alerm alerm = LoadFormSetting();
         form.Init(alerm);
         form.ShowDialog();
         if (form.Committed)
         {
             AlermGrid.Items.Add(form.EditData);
             alermList.Add(form.EditData);
             SaveFormSetting(form.EditData);
         }
         AlermGrid.SelectedIndex = AlermGrid.Items.Count - 1;
         SetButtonEnabled();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #2
0
 /// <summary>
 /// 修正を実行する
 /// </summary>
 private void ExecuteEdit()
 {
     try
     {
         if (AlermGrid.SelectedIndex < 0)
         {
             return;
         }
         Alerm edit = (Alerm)AlermGrid.SelectedItem;
         ScheduleSettingWindow form = new ScheduleSettingWindow();
         form.Init(edit);
         form.ShowDialog();
         if (form.Committed)
         {
             edit.Clone(form.EditData);
             SaveFormSetting(form.EditData);
             SetAlermGrid();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }