Beispiel #1
0
 public IRouteControlLayer CreateControlLayer(IRouteControl control)
 {
     if (layer == null)
     {
         layer = new HillsPointsLayer(this, control);
     }
     return(layer);
 }
 public IRouteControlLayer CreateControlLayer(IRouteControl control)
 {
     if (m_layer == null)
     {
         m_layer = new TrailPointsLayer(this,control);
     }
     return m_layer;
 }
Beispiel #3
0
 public IRouteControlLayer CreateControlLayer(IRouteControl control)
 {
     if (m_layer == null)
     {
         bool mouseEvents = false;
         if (m_zorder == TrailPointsProvider.TrailsLayerZOrderPoints)
         {
             mouseEvents = true;
         }
         m_layer = new TrailPointsLayer(this, control, m_zorder, mouseEvents);
     }
     return(m_layer);
 }
 public TrailPointsLayer(IRouteControlLayerProvider provider, IRouteControl control)
     : base(provider, control, 1)
 {
     Guid currentView = UnitUtil.GetApplication().ActiveView.Id;
     if (m_layers.ContainsKey(currentView))
     {
         m_layers[currentView].m_extraMapLayer = this;
     }
     else
     {
         m_layers[currentView] = this;
     }
 }
Beispiel #5
0
 public TrailPointsLayer(IRouteControlLayerProvider provider, IRouteControl control, int zorder, bool mouseEvents)
     : base(provider, control, zorder, mouseEvents)
 {
     if (UnitUtil.GetApplication() != null && UnitUtil.GetApplication().ActiveView != null)
     {
         Guid   currentView = UnitUtil.GetApplication().ActiveView.Id;
         string key         = currentView.ToString() + zorder;
         if (m_layers.ContainsKey(key))
         {
             m_layers[key].m_extraMapLayer = this;
         }
         else
         {
             m_layers[key] = this;
         }
     }
 }
Beispiel #6
0
        //private static List<Feature> features = new List<Feature>();

        public HillsPointsLayer(IRouteControlLayerProvider provider, IRouteControl control)
            : base(provider, control, 1)
        {
            // HACK: This can't be the best way to get the reports Layer
            // There are 2 layers on the reports view and I don't know how to separate them
            if (PluginMain.GetApplication().ActiveView.Id == GUIDs.ActivityReportsView)
            {
                if (reportsLayer == null)
                {
                    reportsLayer = this;
                }
            }
            else if (PluginMain.GetApplication().ActiveView.Id == GUIDs.DailyActivityView)
            {
                dailyLayer = this;
            }
        }
 public RouteControlLayerBase(IRouteControlLayerProvider provider, IRouteControl control, int zOrder)
 {
     this.provider = provider;
     this.control = control;
     this.zOrder = zOrder;
     this.mapControl = control.MapControl;
     //AddMapControlEventHandlers();
     control.Resize += new EventHandler(OnRouteControlResize);
     control.VisibleChanged += new EventHandler(OnRouteControlVisibleChanged);
     control.MapControlChanged += new EventHandler(OnRouteControlMapControlChanged);
     control.ItemsChanged += new EventHandler(OnRouteControlItemsChanged);
     control.SelectedItemsChanged += new EventHandler(OnRouteControlSelectedItemsChanged);
     control.Disposed += delegate(object sender, EventArgs e)
     {
         //RemoveMapControlEventHandlers();
         control.Resize -= new EventHandler(OnRouteControlResize);
         control.VisibleChanged -= new EventHandler(OnRouteControlVisibleChanged);
         control.MapControlChanged -= new EventHandler(OnRouteControlMapControlChanged);
         control.ItemsChanged -= new EventHandler(OnRouteControlItemsChanged);
         control.SelectedItemsChanged -= new EventHandler(OnRouteControlSelectedItemsChanged);
     };
 }
Beispiel #8
0
 public RouteControlLayerBase(IRouteControlLayerProvider provider, IRouteControl control, int zOrder)
 {
     this.provider   = provider;
     this.control    = control;
     this.zOrder     = zOrder;
     this.mapControl = control.MapControl;
     AddMapControlEventHandlers();
     control.Resize               += new EventHandler(OnRouteControlResize);
     control.VisibleChanged       += new EventHandler(OnRouteControlVisibleChanged);
     control.MapControlChanged    += new EventHandler(OnRouteControlMapControlChanged);
     control.ItemsChanged         += new EventHandler(OnRouteControlItemsChanged);
     control.SelectedItemsChanged += new EventHandler(OnRouteControlSelectedItemsChanged);
     control.Disposed             += delegate(object sender, EventArgs e)
     {
         RemoveMapControlEventHandlers();
         control.Resize               -= new EventHandler(OnRouteControlResize);
         control.VisibleChanged       -= new EventHandler(OnRouteControlVisibleChanged);
         control.MapControlChanged    -= new EventHandler(OnRouteControlMapControlChanged);
         control.ItemsChanged         -= new EventHandler(OnRouteControlItemsChanged);
         control.SelectedItemsChanged -= new EventHandler(OnRouteControlSelectedItemsChanged);
     };
 }