private void frmOutMuliShapeBySelectedGeometryUI_Load(object sender, EventArgs e) { this.comboBox1.Items.Clear(); IFeatureClass fc = null; ZhMapClass zhmap = new ZhMapClass(ArcMap.Document.FocusMap); IFeatureClass[] fcArray = zhmap.GetFeatureClassArray(); for (int i = 0; i < fcArray.Length; i++) { fc = fcArray[i]; if (fc != null) { CommonComboBoxItem itm = new CommonComboBoxItem(); itm.Text = fc.AliasName; itm.Tag = fc; this.comboBox1.Items.Add(itm); } } // this.checkedListBox1.Items.Clear(); zhmap = new ZhMapClass(ArcMap.Document.FocusMap); fcArray = zhmap.GetFeatureClassArray(); for (int i = 0; i < fcArray.Length; i++) { fc = fcArray[i]; if (fc != null) { CommonComboBoxItem itm = new CommonComboBoxItem(); itm.Text = fc.AliasName; itm.Tag = fc; this.checkedListBox1.Items.Add(itm); } } }
private void frmEllipseAreaLayerListUI_Load(object sender, EventArgs e) { //初始化图层 this.comboBox1.Items.Clear(); IFeatureClass fc = null; ZhMapClass zhmap = new ZhMapClass(ArcMap.Document.FocusMap); IFeatureClass[] fcArray = zhmap.GetFeatureClassArray(); for (int i = 0; i < fcArray.Length; i++) { fc = fcArray[i]; if (fc != null) { CommonComboBoxItem itm = new CommonComboBoxItem(); itm.Text = fc.AliasName; itm.Tag = fc; this.comboBox1.Items.Add(itm); } } }