private void FillComboBox() { SelectionTargetComboBox selCombo = SelectionTargetComboBox.GetSelectionComboBox(); if (selCombo == null) { return; } selCombo.ClearAll(); IFeatureLayer featureLayer; // Loop through the layers in the map and add the layer's name to the combo box. for (int i = 0; i < m_map.LayerCount; i++) { if (m_map.get_Layer(i) is IFeatureSelection) { featureLayer = m_map.get_Layer(i) as IFeatureLayer; if (featureLayer == null) { break; } selCombo.AddItem(featureLayer.Name, featureLayer); } } }
public SelectionTargetComboBox() { base.m_category = "Developer Samples"; base.m_caption = "Selection Target"; base.m_message = "Select the selection target C#."; base.m_toolTip = "Select the selection target C#."; base.m_name = "ESRI_SelectionCOMSample_SelectionTargetComboBox"; m_selAllCookie = -1; s_comboBox = this; m_list = new Dictionary <int, IFeatureLayer>(); try { base.m_bitmap = new Bitmap(GetType().Assembly.GetManifestResourceStream("SelectionCOMSample.Images.SelectionTargetComboBox.png")); } catch (Exception ex) { System.Diagnostics.Trace.WriteLine(ex.Message, "Invalid Bitmap"); } }
public SelectionTargetComboBox() { base.m_category = "Developer Samples"; base.m_caption = "Selection Target"; base.m_message = "Select the selection target C#."; base.m_toolTip = "Select the selection target C#."; base.m_name = "ESRI_SelectionCOMSample_SelectionTargetComboBox"; m_selAllCookie = -1; s_comboBox = this; m_list = new Dictionary<int, IFeatureLayer>(); try { base.m_bitmap = new Bitmap(GetType().Assembly.GetManifestResourceStream("SelectionCOMSample.Images.SelectionTargetComboBox.png")); } catch (Exception ex) { System.Diagnostics.Trace.WriteLine(ex.Message, "Invalid Bitmap"); } }