コード例 #1
0
 void DeleteExecute(object param)
 {
     try
     {
         RemoveWeakEventListener(selectedVolumeEvtType, VolumeEvtListener);
         VolumeEvtTypeTarget.Remove(selectedVolumeEvtType);
         RestoreExecute(param);
     }
     catch (Exception x)
     {
         ThisView.ShowMsg(x.ToString());
     }
 }
コード例 #2
0
 void RestoreExecute(object param)
 {
     try
     {
         int ind = listIndex;
         RemoveWeakEventListener(selectedVolumeEvtType, VolumeEvtListener);
         VolumeEvtTypes        = VolumeEvtTypeTarget.FetchVolumeEvtType();
         SelectedVolumeEvtType = VolumeEvtTypes[
             (ind < VolumeEvtTypes.Count) ? ind : 0
                                 ];
         ListIndex = (ind < VolumeEvtTypes.Count) ? ind : 0;
     }
     catch (Exception x)
     {
         ThisView.ShowMsg(x.ToString());
     }
 }
コード例 #3
0
 void SaveExecute(object param)
 {
     try
     {
         if (selectedVolumeEvtType.VOLUME_EVT_TYPE_ID == 0)
         {
             VolumeEvtTypeTarget.Add(selectedVolumeEvtType);
         }
         else
         {
             VolumeEvtTypeTarget.Update(selectedVolumeEvtType);
         }
         RestoreExecute(param);
     }
     catch (Exception x)
     {
         ThisView.ShowMsg(x.ToString());
     }
 }