private Panel GetHostPanel(Plotter plotter)
		{
			if (placement == AxisPlacement.Bottom)
				return plotter.BottomPanel;
			else
				return plotter.TopPanel;
		}
Exemplo n.º 2
0
		protected void RaisePlotterDetaching(Plotter plotter)
		{
			if (PlotterDetaching != null)
			{
				PlotterDetaching(this, new PlotterConnectionEventArgs(plotter));
			}
		}
Exemplo n.º 3
0
		protected void RaisePlotterAttached(Plotter plotter)
		{
			if (PlotterAttached != null)
			{
				PlotterAttached(this, new PlotterConnectionEventArgs(plotter));
			}
		}
Exemplo n.º 4
0
		private Panel GetHostPanel(Plotter plotter)
		{
			if (placement == AxisPlacement.Left)
				return plotter.LeftPanel;
			else
				return plotter.RightPanel;
		}
 public void OnPlotterAttached(Plotter plotter)
 {
     if (this.plotter == null)
     {
         this.plotter = plotter;
         plotter.BottomPanel.Children.Add(this);
     }
 }
Exemplo n.º 6
0
		public override void OnPlotterDetaching(Plotter plotter)
		{
			Plotter2D.CentralGrid.Children.Remove(grid);
			grid = null;
			canvas = null;

			base.OnPlotterDetaching(plotter);
		}
Exemplo n.º 7
0
		public void OnPlotterDetaching(Plotter plotter)
		{
			this.plotter = null;

			var hostPanel = GetHostPanel(plotter);

			hostPanel.Children.Remove(this);
		}
 public void OnPlotterDetaching(Plotter plotter)
 {
     if (this.plotter != null)
     {
         this.plotter = null;
         plotter.BottomPanel.Children.Remove(this);
     }
 }
Exemplo n.º 9
0
		public void OnPlotterAttached(Plotter plotter)
		{
			this.plotter = plotter;

			var hostPanel = GetHostPanel(plotter);
			var index = GetInsertPosition(hostPanel);

			hostPanel.Children.Insert(index, this);
		}
Exemplo n.º 10
0
		protected override void OnPlotterAttached(Plotter plotter)
		{
			base.OnPlotterAttached(plotter);

			plotter2D = (Plotter2D)plotter;
			GetHostPanel(plotter).Children.Add(this);
			viewport = plotter2D.Viewport;
			viewport.PropertyChanged += OnViewportPropertyChanged;
		}
Exemplo n.º 11
0
		protected override void OnPlotterDetaching(Plotter plotter)
		{
			base.OnPlotterDetaching(plotter);

			viewport.PropertyChanged -= OnViewportPropertyChanged;
			viewport = null;
			GetHostPanel(plotter).Children.Remove(this);
			plotter2D = null;
		}
Exemplo n.º 12
0
		public static void AddToPlotter(this IPlotterElement element, Plotter plotter)
		{
			if (element == null)
				throw new ArgumentNullException("element");
			if (plotter == null)
				throw new ArgumentNullException("plotter");


			plotter.Children.Add(element);
		}
Exemplo n.º 13
0
		public override void OnPlotterAttached(Plotter plotter)
		{
			base.OnPlotterAttached(plotter);

			grid = new Grid();
			canvas = new Canvas { ClipToBounds = true };
			grid.Children.Add(canvas);

			Plotter2D.CentralGrid.Children.Add(grid);
		}
Exemplo n.º 14
0
		void IPlotterElement.OnPlotterAttached(Plotter plotter)
		{
			plotter.MainCanvas.Children.Add(this);

			Plotter2D plotter2d = (Plotter2D)plotter;
			this.plotter = plotter2d;
			plotter2d.Viewport.PropertyChanged += Viewport_PropertyChanged;

			UpdateUIRepresentation();
		}
Exemplo n.º 15
0
		void IPlotterElement.OnPlotterDetaching(Plotter plotter)
		{
			this.plotter.Viewport.PropertyChanged -= OnViewportPropertyChanged;
			this.plotter.Viewport.DomainChanged -= OnViewportDomainChanged;

			GetHostPanel(plotter).Children.Remove(scrollBar);

			UpdateScrollBar(null);

			this.plotter = null;
		}
Exemplo n.º 16
0
        public override void OnPlotterAttached(Plotter plotter)
        {
            if (Plotter2D == null)
            {
                base.OnPlotterAttached(plotter);

                plotter2D = (Plotter2D)plotter;
                viewport = plotter2D.Viewport;
                viewport.OutputChanged += new EventHandler<RectChangedEventArgs>(viewport_OutputChanged);
                viewport.VisibleChanged += new EventHandler<RectChangedEventArgs>(viewport_VisibleChanged);
            }
        }
Exemplo n.º 17
0
		public virtual void OnPlotterDetaching(Plotter plotter)
		{
			this.plotter.Viewport.PropertyChanged -= Viewport_PropertyChanged;

			if (!IsMarkersHost)
			{
				plotter.CentralGrid.Children.Remove(hostingCanvas);
			}
			hostingCanvas.Children.Remove(this);

			this.plotter = null;
		}
Exemplo n.º 18
0
		void IPlotterElement.OnPlotterAttached(Plotter plotter)
		{
			GetHostPanel(plotter).Children.Add(scrollBar);

			Plotter2D plotter2d = (Plotter2D)plotter;
			this.plotter = plotter2d;
			var viewport = plotter2d.Viewport;
			viewport.PropertyChanged += OnViewportPropertyChanged;
			viewport.DomainChanged += OnViewportDomainChanged;

			UpdateScrollBar(viewport);
		}
		public IValueConverter TryBuildConverter(Type dataType, Plotter plotter)
		{
			IValueConverter result = null;

			IValueConversionContext context = new ValueConversionContext { Plotter = plotter };
			foreach (var factory in factories)
			{
				result = factory.TryBuildConverter(dataType, context);
				if (result != null)
					return result;
			}

			return result;
		}
Exemplo n.º 20
0
 public void OnPlotterAttached(Plotter plotter)
 {
     if (parentPlotter == null)
     {
         if (content == null)
             throw new Exception("Content of the Vertical axis should be set befor adding vertical axis to the plotter");
         if (!alreadyLoaded)
         {
             canvas.Children.Add(content);
             alreadyLoaded = true;
         }
         parentPlotter = plotter;
         plotter.LeftPanel.Children.Insert(0,this);
     }
 }
Exemplo n.º 21
0
        private static void OnIsDefaultAxisChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Plotter         parentPlotter  = null;
            IPlotterElement plotterElement = d as IPlotterElement;

            if (plotterElement != null)
            {
                parentPlotter = plotterElement.Plotter;

                if (parentPlotter != null)
                {
                    parentPlotter.OnIsDefaultAxisChangedCore(d, e);
                }
            }
        }
Exemplo n.º 22
0
		public virtual void OnPlotterAttached(Plotter plotter)
		{
			this.plotter = (Plotter2D)plotter;
			viewport = this.plotter.Viewport;

			if (!IsMarkersHost)
			{
				plotter.CentralGrid.Children.Add(hostingCanvas);
			}
			if (Parent == null)
			{
				hostingCanvas.Children.Add(this);
			}
			this.plotter.Viewport.PropertyChanged += Viewport_PropertyChanged;
		}
Exemplo n.º 23
0
 public void OnPlotterAttached(Plotter plotter)
 {
     if (parentPlotter == null)
     {
         if (content == null)
         {
             throw new Exception("Content of the Vertical axis should be set befor adding vertical axis to the plotter");
         }
         if (!alreadyLoaded)
         {
             canvas.Children.Add(content);
             alreadyLoaded = true;
         }
         parentPlotter = plotter;
         plotter.LeftPanel.Children.Insert(0, this);
     }
 }
        private static void OnIsDefaultAxisChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            //<function summary>
            // Perform the following when the default axis changes
            //</function summary>

            Plotter         parentPlotter  = null;
            IPlotterElement plotterElement = d as IPlotterElement;

            if (plotterElement != null)
            {
                parentPlotter = plotterElement.Plotter;

                if (parentPlotter != null)
                {
                    parentPlotter.OnIsDefaultAxisChangedCore(d, e);
                }
            }
        }
Exemplo n.º 25
0
 public override void OnPlotterAttached(Plotter plotter)
 {
     if (parentPlotter == null)
     {
         base.OnPlotterAttached(plotter);
         parentPlotter = plotter;
         Plotter.MainCanvas.SizeChanged += new SizeChangedEventHandler(MainCanvas_SizeChanged);
         Plotter.MainCanvas.Children.Add(path);
         if (IsTooltipEnabled)
         {
             tooltip = new ToolTip
             {
                 Content = Description
             };
             path.MouseEnter += new MouseEventHandler(LineGraph_MouseEnter);
             path.MouseLeave += new MouseEventHandler(LineGraph_MouseLeave);
             ToolTipService.SetToolTip(path, tooltip);
         }
     }
     UpdateCore();
 }
Exemplo n.º 26
0
        void IPlotterElement.OnPlotterAttached(Plotter plotter)
        {
            this.plotter = (Plotter2D)plotter;

            plotter.MainGrid.Children.Add(ViewportPanel);

            HeaderPanel = plotter.HeaderPanel;
            FooterPanel = plotter.FooterPanel;

            LeftPanel   = plotter.LeftPanel;
            BottomPanel = plotter.BottomPanel;
            RightPanel  = plotter.RightPanel;
            TopPanel    = plotter.BottomPanel;

            MainCanvas     = plotter.MainCanvas;
            CentralGrid    = plotter.CentralGrid;
            MainGrid       = plotter.MainGrid;
            ParallelCanvas = plotter.ParallelCanvas;

            OnLoaded();
        }
 /// <summary>This method is invoked when element is being detached from plotter. If additional
 /// controls were put on plotter in OnPlotterAttached method, they should be removed here</summary>
 /// <remarks>This method is always called in pair with OnPlotterAttached</remarks>
 public virtual void OnPlotterDetaching(Plotter plotter)
 {
     RaisePlotterDetaching(plotter);
     this.plotter = null;
 }
 /// <summary>This method is invoked when element is attached to plotter. It is the place
 /// to put additional controls to Plotter</summary>
 /// <param name="plotter">Plotter for this element</param>
 public virtual void OnPlotterAttached(Plotter plotter)
 {
     this.plotter = plotter;
     RaisePlotterAttached(plotter);
 }
Exemplo n.º 29
0
 public void OnPlotterDetaching(Plotter plotter)
 {
     parentPlotter = null;
     plotter.FooterPanel.Children.Remove(this);
 }
Exemplo n.º 30
0
 protected virtual Panel GetHostPanel(Plotter plotter)
 {
     return(plotter.MainGrid);
 }
Exemplo n.º 31
0
		public void OnPlotterAttached(Plotter plotter)
		{
			this.plotter = plotter;
			plotter.FooterPanel.Children.Add(this);
		}
Exemplo n.º 32
0
 void IPlotterElement.OnPlotterDetaching(Plotter plotter)
 {
     OnPlotterDetaching(plotter);
 }
 public void OnPlotterAttached(Plotter plotter)
 {
     this.plotter = plotter;
     plotter.BottomPanel.Children.Add(this);
 }
Exemplo n.º 34
0
 void IPlotterElement.OnPlotterDetaching(Plotter plotter)
 {
     plotter.CentralGrid.Children.Remove(this);
     this.plotter = null;
 }
Exemplo n.º 35
0
 void IPlotterElement.OnPlotterAttached(Plotter plotter)
 {
     this.plotter = plotter;
     plotter.CentralGrid.Children.Add(this);
 }
Exemplo n.º 36
0
 void IPlotterElement.OnPlotterDetaching(Plotter plotter)
 {
     plotter.FooterPanel.Children.Remove(this);
     this.plotter = null;
 }
Exemplo n.º 37
0
 public static void SetPlotter(DependencyObject obj, Plotter value)
 {
     obj.SetValue(PlotterProperty, value);
 }
Exemplo n.º 38
0
 protected abstract Panel GetHostPanel(Plotter plotter);
Exemplo n.º 39
0
		void IPlotterElement.OnPlotterDetaching(Plotter plotter)
		{
			if (!insideViewportListView)
				plotter.CentralGrid.Children.Remove(this);

			this.plotter.Viewport.PropertyChanged -= Viewport_PropertyChanged;
			this.plotter = null;
		}
Exemplo n.º 40
0
 void IPlotterElement.OnPlotterAttached(Plotter plotter)
 {
     this.plotter = plotter;
     plotter.FooterPanel.Children.Add(this);
 }
Exemplo n.º 41
0
        public override void OnPlotterDetaching(Plotter plotter)
        {
            Plotter.Viewport.FittedToView -= Viewport_FittedToView;

            base.OnPlotterDetaching(plotter);
        }
Exemplo n.º 42
0
 public override void OnPlotterAttached(Plotter plotter)
 {
     base.OnPlotterAttached(plotter);
     UpdateBounds(DataSource);
 }
Exemplo n.º 43
0
 void IPlotterElement.OnPlotterAttached(Plotter plotter)
 {
     OnPlotterAttached(plotter);
 }
Exemplo n.º 44
0
 public void OnPlotterAttached(Plotter plotter)
 {
     this.plotter = plotter;
     AddToPlotter();
 }
Exemplo n.º 45
0
 protected virtual Panel GetHostPanel(Plotter plotter)
 {
     return(plotter.CentralGrid);
 }
Exemplo n.º 46
0
 public void OnPlotterDetaching(Plotter plotter)
 {
     RemoveFromPlotter();
     this.plotter = null;
 }
Exemplo n.º 47
0
		public void OnPlotterDetaching(Plotter plotter)
		{
			plotter.FooterPanel.Children.Remove(this);
			this.plotter = null;
		}
Exemplo n.º 48
0
 public override void OnPlotterAttached(Plotter plotter)
 {
     if (parentPlotter == null)
     {
         base.OnPlotterAttached(plotter);
         parentPlotter = plotter;
         Plotter.MainCanvas.SizeChanged += new SizeChangedEventHandler(MainCanvas_SizeChanged);
         Plotter.MainCanvas.Children.Add(path);
         if (IsTooltipEnabled)
         {
             tooltip = new ToolTip
             {
                 Content = Description
             };
             path.MouseEnter += new MouseEventHandler(LineGraph_MouseEnter);
             path.MouseLeave += new MouseEventHandler(LineGraph_MouseLeave);
             ToolTipService.SetToolTip(path, tooltip);
         }
     }
     UpdateCore();
 }
        protected override void OnPlotterAttached(Plotter plotter)
        {
            base.OnPlotterAttached(plotter);

            grid = new Grid();
            canvas = new Canvas {ClipToBounds = true};
            grid.Children.Add(canvas);

            Plotter2D.CentralGrid.Children.Add(grid);
            Panel.SetZIndex(grid, base.ZIndex);
        }
Exemplo n.º 50
0
 public override void OnPlotterDetaching(Plotter plotter)
 {
     if (parentPlotter != null)
     {
         Plotter.MainCanvas.SizeChanged -= MainCanvas_SizeChanged;
         plotter.MainCanvas.Children.Remove(path);
         parentPlotter = null;
         base.OnPlotterDetaching(plotter);
     }
 }
Exemplo n.º 51
0
 public override void OnPlotterAttached(d3.Plotter plotter)
 {
 }
        void IPlotterElement.OnPlotterAttached(Plotter plotter)
        {
            this.plotter = plotter;
            plotter.Children.CollectionChanged += OnPlotterChildrenChanged;
            plotter.CentralGrid.Children.Add(this);

            SubscribeOnEvents();
            PopulateLegend();
        }
 public PlotterConnectionEventArgs(Plotter plotter)
 {
     this.plotter = plotter;
 }
        void IPlotterElement.OnPlotterDetaching(Plotter plotter)
        {
            UnsubscribeFromEvents();
            plotter.CentralGrid.Children.Remove(this);
            plotter.Children.CollectionChanged -= OnPlotterChildrenChanged;

            this.plotter = null;

            PopulateLegend();
        }
Exemplo n.º 55
0
		void IPlotterElement.OnPlotterAttached(Plotter plotter)
		{
			this.plotter = (Plotter2D)plotter;
			this.plotter.Viewport.PropertyChanged += Viewport_PropertyChanged;

			if (!insideViewportListView)
				plotter.CentralGrid.Children.Add(this);
		}
Exemplo n.º 56
0
 /// <summary>This method is invoked when element is attached to plotter. It is the place
 /// to put additional controls to Plotter</summary>
 /// <param name="plotter">Plotter for this element</param>
 protected virtual void OnPlotterAttached(Plotter plotter)
 {
     this.plotter = plotter;
 }
Exemplo n.º 57
0
 public void OnPlotterAttached(Plotter plotter)
 {
     parentPlotter = plotter;
     parentPlotter.FooterPanel.Children.Add(this);
 }
Exemplo n.º 58
0
 /// <summary>This method is invoked when element is being detached from plotter. If additional
 /// controls were put on plotter in OnPlotterAttached method, they should be removed here</summary>
 /// <remarks>This method is always called in pair with OnPlotterAttached</remarks>
 protected virtual void OnPlotterDetaching(Plotter plotter)
 {
     this.plotter = null;
 }
Exemplo n.º 59
0
        void IPlotterElement.OnPlotterDetaching(Plotter plotter)
        {
            plotter.MainGrid.Children.Remove(ViewportPanel);

            this.plotter = null;
        }
 public void OnPlotterDetaching(Plotter plotter)
 {
     this.plotter = null;
     plotter.BottomPanel.Children.Remove(this);
 }