Beispiel #1
0
 private void addNewRadarArea(string nameDefault = "")
 {
     try
     {
         var winAdd = new VTSCore.Layers.Base.ModifyValueClient("新增雷达区域名称设置", nameDefault);
         if (winAdd.ShowDialog().Value)
         {
             if (_radarAreas.IsEffectiveName(winAdd.Heading))
             {
                 RadarRegion region = new RadarRegion()
                 {
                     Name = winAdd.Heading, IsMask = true
                 };
                 importNewRadarArea(region);
                 initListView();
                 SelectedIndex(radarAreasListView.Items.Count - 1);
             }
             else
             {
                 addNewRadarArea(winAdd.Heading);
             }
         }
     }
     catch (Exception ex)
     {
         LogService.Error("导入区域错误!" + Environment.NewLine + ex.ToString());
         MessageBox.Show("导入区域错误!" + Environment.NewLine + ex.Message);
     }
 }
Beispiel #2
0
 private void renamingRadarArea()
 {
     if (radarAreasListView.SelectedIndex >= 0)
     {
         var winAdd = new VTSCore.Layers.Base.ModifyValueClient("雷达区域重命名", _radarAreas.PresPlottingName);
         if (winAdd.ShowDialog().Value)
         {
             if (_radarAreas.PresPlottingName != winAdd.Heading)
             {
                 if (_radarAreas.IsEffectiveName(winAdd.Heading))
                 {
                     _radarAreas.PresPlottingName = winAdd.Heading;
                 }
             }
         }
     }
 }