diff --git a/FrmDiameterQuery.cs b/FrmDiameterQuery.cs index 2b86a3b..fe7b1ca 100644 --- a/FrmDiameterQuery.cs +++ b/FrmDiameterQuery.cs @@ -2,8 +2,11 @@ using System.Collections.Generic; using System.Data; using System.Drawing; +using System.Linq; using System.Windows.Forms; using DevComponents.DotNetBar; +using DevComponents.DotNetBar.Controls; +using DXFLibrary; using GeoScene.Globe; namespace Cyberpipe @@ -51,6 +54,7 @@ private void FrmDiameterSel_Load(object sender, EventArgs e) { comboBoxEx1.Items.Clear(); + List tempString = new List(); for (int i = 0; i < globeControl1.Globe.Layers.Count; i++)//获取树节点后中所有的layer图层 { GSOLayer layer = globeControl1.Globe.Layers[i]; @@ -60,11 +64,16 @@ if (layer.Type == EnumLayerType.FeatureLayer && !name.Contains("\\") && !name.Contains("施工")) { if (name.EndsWith("管线") && name != "供电管线" && name != "电信管线") // 消防、污水、供电、给水、电信、雨水,供电和电信表没有“管径”列 - comboBoxEx1.Items.Add(name); + { + //comboBoxEx1.Items.Add(name); + tempString.Add(name); + } + } } } + tempString.Distinct().ToList().ForEach(s => comboBoxEx1.Items.Add(s)); value = comboBoxEx2.Location.X - textBoxX2.Location.X;