예제 #1
0
 /// <summary>
 /// This is responsible for unwiring the ZoomToLayer event.
 /// </summary>
 /// <param name="collection"></param>
 protected override void Ignore_Layer_Events(ILayerEvents collection)
 {
     if (collection == null)
     {
         return;
     }
     collection.ZoomToLayer  -= Layers_ZoomToLayer;
     collection.LayerAdded   -= Layers_LayerAdded;
     collection.LayerRemoved -= Layers_LayerRemoved;
     base.Ignore_Layer_Events(collection);
 }
예제 #2
0
 /// <summary>
 /// This is responsible for wiring the ZoomToLayer event from any layers
 /// in the map frame whenever the layer collection is changed.
 /// </summary>
 /// <param name="collection">Collection the events get wired to.</param>
 protected override void HandleLayerEvents(ILayerEvents collection)
 {
     if (collection == null)
     {
         return;
     }
     collection.ZoomToLayer  += LayersZoomToLayer;
     collection.LayerAdded   += LayersLayerAdded;
     collection.LayerRemoved += LayersLayerRemoved;
     base.HandleLayerEvents(collection);
 }
예제 #3
0
        /// <summary>
        /// When setting an old layer collection it is advisable to not only add
        /// new handlers to the new collection, but remove the handlers related
        /// to the old collection.
        /// </summary>
        /// <param name="collection"></param>
        protected virtual void Ignore_Layer_Events(ILayerEvents collection)
        {
            if (collection == null) return;
            collection.LayerVisibleChanged -= LayersLayerVisibleChanged;
            collection.ItemChanged -= LayersItemChanged;
            collection.ZoomToLayer -= Layers_ZoomToLayer;
            collection.SelectionChanging -= collection_SelectionChanging;
            collection.LayerSelected -= collection_LayerSelected;
            collection.LayerAdded -= Layers_LayerAdded;
            collection.LayerRemoved -= Layers_LayerRemoved;

            collection.SelectionChanged -= collection_SelectionChanged;
        }
예제 #4
0
 /// <summary>
 /// When setting an old layer collection it is advisable to not only add
 /// new handlers to the new collection, but remove the handlers related to the old collection.
 /// </summary>
 /// <param name="collection">Collection events get removed from.</param>
 protected virtual void IgnoreLayerEvents(ILayerEvents collection)
 {
     if (collection == null)
     {
         return;
     }
     collection.LayerVisibleChanged -= LayersLayerVisibleChanged;
     collection.ItemChanged         -= LayersItemChanged;
     collection.ZoomToLayer         -= LayersZoomToLayer;
     collection.SelectionChanging   -= CollectionSelectionChanging;
     collection.LayerSelected       -= CollectionLayerSelected;
     collection.LayerAdded          -= LayersLayerAdded;
     collection.LayerRemoved        -= LayersLayerRemoved;
     collection.SelectionChanged    -= CollectionSelectionChanged;
 }
예제 #5
0
        /// <summary>
        /// Given a new LayerCollection, we need to be sensitive to certain events
        /// </summary>
        protected virtual void Handle_Layer_Events(ILayerEvents collection)
        {
            if (collection == null)
            {
                return;
            }
            collection.LayerVisibleChanged += LayersLayerVisibleChanged;
            collection.ItemChanged         += LayersItemChanged;
            collection.ZoomToLayer         += Layers_ZoomToLayer;
            collection.SelectionChanging   += collection_SelectionChanging;
            collection.LayerSelected       += collection_LayerSelected;
            collection.LayerAdded          += Layers_LayerAdded;
            collection.LayerRemoved        += Layers_LayerRemoved;

            collection.SelectionChanged += collection_SelectionChanged;
        }
예제 #6
0
 /// <summary>
 /// When setting an old layer collection it is advisable to not only add
 /// new handlers to the new collection, but remove the handlers related
 /// to the old collection.
 /// </summary>
 /// <param name="collection"></param>
 protected virtual void Ignore_Layer_Events(ILayerEvents collection)
 {
     if (collection == null) return;
     collection.LayerVisibleChanged -= Layers_LayerVisibleChanged;
     collection.ItemChanged -= Layers_ItemChanged;
     collection.ZoomToLayer -= Layers_ZoomToLayer;
     collection.SelectionChanging -= collection_SelectionChanging;
     collection.LayerSelected -= collection_LayerSelected;
     collection.LayerAdded -= Layers_LayerAdded;
     collection.LayerRemoved -= Layers_LayerRemoved;
 }
예제 #7
0
 /// <summary>
 /// This is responsible for unwiring the ZoomToLayer event.
 /// </summary>
 /// <param name="collection"></param>
 protected override void Ignore_Layer_Events(ILayerEvents collection)
 {
     if (collection == null) return;
     collection.ZoomToLayer -= Layers_ZoomToLayer;
     collection.LayerAdded -= Layers_LayerAdded;
     collection.LayerRemoved -= Layers_LayerRemoved;
     base.Ignore_Layer_Events(collection);
 }
예제 #8
0
 /// <summary>
 /// This is responsible for wiring the ZoomToLayer event from any layers
 /// in the map frame whenever the layer collection is changed.
 /// </summary>
 /// <param name="collection"></param>
 protected override void Handle_Layer_Events(ILayerEvents collection)
 {
     if (collection == null) return;
     collection.ZoomToLayer += Layers_ZoomToLayer;
     collection.LayerAdded += Layers_LayerAdded;
     collection.LayerRemoved += Layers_LayerRemoved;
     base.Handle_Layer_Events(collection);
 }
예제 #9
0
        /// <summary>
        /// Given a new LayerCollection, we need to be sensitive to certain events
        /// </summary>
        protected virtual void Handle_Layer_Events(ILayerEvents collection)
        {
            if (collection == null) return;
            collection.LayerVisibleChanged += LayersLayerVisibleChanged;
            collection.ItemChanged += LayersItemChanged;
            collection.ZoomToLayer += Layers_ZoomToLayer;
            collection.SelectionChanging += collection_SelectionChanging;
            collection.LayerSelected += collection_LayerSelected;
            collection.LayerAdded += Layers_LayerAdded;
            collection.LayerRemoved += Layers_LayerRemoved;

            collection.SelectionChanged += collection_SelectionChanged;
        }
예제 #10
0
 /// <summary>
 /// Unwires events from the layer collection
 /// </summary>
 /// <param name="collection"></param>
 protected override void Ignore_Layer_Events(ILayerEvents collection)
 {
     if (collection == null) return;
     IMapLayerCollection glc = collection as IMapLayerCollection;
     if (glc == null) return;
     glc.BufferChanged -= GeoLayerBufferChanged;
     glc.LayerAdded -= LayerColection_LayerAdded;
     glc.LayerVisibleChanged -= LayerCollection_LayerVisibleChanged;
     base.Ignore_Layer_Events(collection);
 }
예제 #11
0
 /// <summary>
 /// Wires each of the layer events that the MapFrame should be listening to.
 /// </summary>
 /// <param name="collection"></param>
 protected override void Handle_Layer_Events(ILayerEvents collection)
 {
     if (collection == null) return;
     IMapLayerCollection glc = collection as IMapLayerCollection;
     if (glc == null) return;
     glc.BufferChanged += GeoLayerBufferChanged;
     glc.LayerAdded += LayerColection_LayerAdded;
     glc.LayerVisibleChanged += LayerCollection_LayerVisibleChanged;
     glc.ItemChanged += LayerCollection_MembersChanged;
     base.Handle_Layer_Events(collection);
 }