Beispiel #1
0
 private void AvEvent_ItemAdded(object Item)
 {
     m_map = ArcMap.Document.FocusMap;
     if (m_map != null)
     {
         LayerDropdown.FillComboBox(m_map);
     }
     m_hasSelectableLayer = CheckForSelectableLayer();
 }
        // Privates
        private void Initialize()
        {
            // If the extension hasn't been started yet, bail
            if (s_extension == null)
            {
                return;
            }
            //// Reset event handlers
            IActiveViewEvents_Event avEvent = ArcMap.Document.FocusMap as IActiveViewEvents_Event;

            if (avEvent == null)
            {
                return;
            }
            avEvent.ItemAdded       += AvEvent_ItemAdded;
            avEvent.ItemDeleted     += AvEvent_ItemAdded;
            avEvent.ContentsChanged += avEvent_ContentsChanged;
            // Update the UI
            m_map = ArcMap.Document.FocusMap;
            LayerDropdown.FillComboBox(m_map);
            m_hasSelectableLayer = CheckForSelectableLayer();
        }
Beispiel #3
0
 //event handlers
 private void avEvent_ContentsChanged()
 {
     m_hasSelectableLayer = CheckForSelectableLayer();
     LayerDropdown.FillComboBox(m_map);
 }