Beispiel #1
0
 private void AnalyzeLayer()
 {
     this.LayerscheckedListBox.Items.Clear();
     this.ColorscheckedListBox.Items.Clear();
     if (!string.IsNullOrEmpty(this.CADtextBox.Text))
     {
         IFeatureClass featureClass = CADManager.GetFeatureClass(this.CADtextBox.Text);
         if (featureClass == null)
         {
             MessageBox.Show(string.Format("无法打开文件{0}", System.IO.Path.GetFileName(this.CADtextBox.Text)));
             return;
         }
         _featureClass = featureClass;
         var layers = _featureClass.GetUniqueValue(LayerName);
         foreach (var item in layers)
         {
             this.LayerscheckedListBox.Items.Add(item, true);
         }
         var colors = _featureClass.GetUniqueValue(ColorName);
         foreach (var item in colors)
         {
             this.ColorscheckedListBox.Items.Add(item, true);
         }
     }
 }