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

			base.OnPlotterDetaching(plotter);
		}
コード例 #7
0
		public void OnPlotterDetaching(Plotter plotter)
		{
			this.plotter = null;

			var hostPanel = GetHostPanel(plotter);

			hostPanel.Children.Remove(this);
		}
コード例 #8
0
 public void OnPlotterDetaching(Plotter plotter)
 {
     if (this.plotter != null)
     {
         this.plotter = null;
         plotter.BottomPanel.Children.Remove(this);
     }
 }
コード例 #9
0
		public void OnPlotterAttached(Plotter plotter)
		{
			this.plotter = plotter;

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

			hostPanel.Children.Insert(index, this);
		}
コード例 #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;
		}
コード例 #11
0
		protected override void OnPlotterDetaching(Plotter plotter)
		{
			base.OnPlotterDetaching(plotter);

			viewport.PropertyChanged -= OnViewportPropertyChanged;
			viewport = null;
			GetHostPanel(plotter).Children.Remove(this);
			plotter2D = null;
		}
コード例 #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);
		}
コード例 #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);
		}
コード例 #14
0
ファイル: ViewportUIContainer.cs プロジェクト: BdGL3/CXPortal
		void IPlotterElement.OnPlotterAttached(Plotter plotter)
		{
			plotter.MainCanvas.Children.Add(this);

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

			UpdateUIRepresentation();
		}
コード例 #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;
		}
コード例 #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);
            }
        }
コード例 #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;
		}
コード例 #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);
		}
コード例 #19
0
		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;
		}
コード例 #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);
     }
 }
コード例 #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);
                }
            }
        }
コード例 #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;
		}
コード例 #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);
     }
 }
コード例 #24
0
        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);
                }
            }
        }
コード例 #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();
 }
コード例 #26
0
ファイル: InjectedPlotter.cs プロジェクト: lulzzz/HedgeHog
        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);
 }
コード例 #29
0
ファイル: footer.cs プロジェクト: arenascats/SerialPortChart-
 public void OnPlotterDetaching(Plotter plotter)
 {
     parentPlotter = null;
     plotter.FooterPanel.Children.Remove(this);
 }
コード例 #30
0
ファイル: Viewport2D.cs プロジェクト: marzlia/CXPortal
 protected virtual Panel GetHostPanel(Plotter plotter)
 {
     return(plotter.MainGrid);
 }
コード例 #31
0
ファイル: Footer.cs プロジェクト: XiBeichuan/hydronumerics
		public void OnPlotterAttached(Plotter plotter)
		{
			this.plotter = plotter;
			plotter.FooterPanel.Children.Add(this);
		}
コード例 #32
0
 void IPlotterElement.OnPlotterDetaching(Plotter plotter)
 {
     OnPlotterDetaching(plotter);
 }
 public void OnPlotterAttached(Plotter plotter)
 {
     this.plotter = plotter;
     plotter.BottomPanel.Children.Add(this);
 }
コード例 #34
0
 void IPlotterElement.OnPlotterDetaching(Plotter plotter)
 {
     plotter.CentralGrid.Children.Remove(this);
     this.plotter = null;
 }
コード例 #35
0
 void IPlotterElement.OnPlotterAttached(Plotter plotter)
 {
     this.plotter = plotter;
     plotter.CentralGrid.Children.Add(this);
 }
コード例 #36
0
ファイル: Footer.cs プロジェクト: a2122121/DynamicDataDisplay
 void IPlotterElement.OnPlotterDetaching(Plotter plotter)
 {
     plotter.FooterPanel.Children.Remove(this);
     this.plotter = null;
 }
コード例 #37
0
ファイル: Plotter.cs プロジェクト: gr001/PeaksProcessing2
 public static void SetPlotter(DependencyObject obj, Plotter value)
 {
     obj.SetValue(PlotterProperty, value);
 }
コード例 #38
0
 protected abstract Panel GetHostPanel(Plotter plotter);
コード例 #39
0
ファイル: ViewportPanel.cs プロジェクト: BdGL3/CXPortal
		void IPlotterElement.OnPlotterDetaching(Plotter plotter)
		{
			if (!insideViewportListView)
				plotter.CentralGrid.Children.Remove(this);

			this.plotter.Viewport.PropertyChanged -= Viewport_PropertyChanged;
			this.plotter = null;
		}
コード例 #40
0
ファイル: Footer.cs プロジェクト: a2122121/DynamicDataDisplay
 void IPlotterElement.OnPlotterAttached(Plotter plotter)
 {
     this.plotter = plotter;
     plotter.FooterPanel.Children.Add(this);
 }
コード例 #41
0
        public override void OnPlotterDetaching(Plotter plotter)
        {
            Plotter.Viewport.FittedToView -= Viewport_FittedToView;

            base.OnPlotterDetaching(plotter);
        }
コード例 #42
0
 public override void OnPlotterAttached(Plotter plotter)
 {
     base.OnPlotterAttached(plotter);
     UpdateBounds(DataSource);
 }
コード例 #43
0
 void IPlotterElement.OnPlotterAttached(Plotter plotter)
 {
     OnPlotterAttached(plotter);
 }
コード例 #44
0
 public void OnPlotterAttached(Plotter plotter)
 {
     this.plotter = plotter;
     AddToPlotter();
 }
コード例 #45
0
 protected virtual Panel GetHostPanel(Plotter plotter)
 {
     return(plotter.CentralGrid);
 }
コード例 #46
0
 public void OnPlotterDetaching(Plotter plotter)
 {
     RemoveFromPlotter();
     this.plotter = null;
 }
コード例 #47
0
ファイル: Footer.cs プロジェクト: XiBeichuan/hydronumerics
		public void OnPlotterDetaching(Plotter plotter)
		{
			plotter.FooterPanel.Children.Remove(this);
			this.plotter = null;
		}
コード例 #48
0
ファイル: LineGraph.cs プロジェクト: XiBeichuan/hydronumerics
 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();
 }
コード例 #49
0
        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);
        }
コード例 #50
0
ファイル: LineGraph.cs プロジェクト: XiBeichuan/hydronumerics
 public override void OnPlotterDetaching(Plotter plotter)
 {
     if (parentPlotter != null)
     {
         Plotter.MainCanvas.SizeChanged -= MainCanvas_SizeChanged;
         plotter.MainCanvas.Children.Remove(path);
         parentPlotter = null;
         base.OnPlotterDetaching(plotter);
     }
 }
コード例 #51
0
 public override void OnPlotterAttached(d3.Plotter plotter)
 {
 }
コード例 #52
0
        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;
 }
コード例 #54
0
        void IPlotterElement.OnPlotterDetaching(Plotter plotter)
        {
            UnsubscribeFromEvents();
            plotter.CentralGrid.Children.Remove(this);
            plotter.Children.CollectionChanged -= OnPlotterChildrenChanged;

            this.plotter = null;

            PopulateLegend();
        }
コード例 #55
0
ファイル: ViewportPanel.cs プロジェクト: BdGL3/CXPortal
		void IPlotterElement.OnPlotterAttached(Plotter plotter)
		{
			this.plotter = (Plotter2D)plotter;
			this.plotter.Viewport.PropertyChanged += Viewport_PropertyChanged;

			if (!insideViewportListView)
				plotter.CentralGrid.Children.Add(this);
		}
コード例 #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;
 }
コード例 #57
0
ファイル: footer.cs プロジェクト: arenascats/SerialPortChart-
 public void OnPlotterAttached(Plotter plotter)
 {
     parentPlotter = plotter;
     parentPlotter.FooterPanel.Children.Add(this);
 }
コード例 #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;
 }
コード例 #59
0
ファイル: InjectedPlotter.cs プロジェクト: lulzzz/HedgeHog
        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);
 }