• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Plotter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Plotter的典型用法代码示例。如果您正苦于以下问题:C# Plotter类的具体用法?C# Plotter怎么用?C# Plotter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Plotter类属于命名空间,在下文中一共展示了Plotter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1:

		void IPlotterElement.OnPlotterAttached(Plotter plotter)
		{
			this.plotter = (Plotter2D)plotter;
			this.plotter.Viewport.PropertyChanged += Viewport_PropertyChanged;

			plotter.CentralGrid.Children.Add(this);
		}
开发者ID:BdGL3,项目名称:CXPortal,代码行数:7,代码来源:ViewportListView.xaml.cs


示例2: GetPlotterPanel

		void IPlotterElement.OnPlotterAttached(Plotter plotter)
		{
			this.plotter = plotter;

			if (Content == null) return;

			var plotterPanel = GetPlotterPanel(Content);
			//Plotter.SetPlotter(Content, plotter);

			if (plotterPanel == PlotterPanel.MainCanvas)
			{
				// if all four Canvas.{Left|Right|Top|Bottom} properties are not set,
				// and as we are adding by default content to MainCanvas, 
				// and since I like more when buttons are by default in right down corner - 
				// set bottom and right to 10.
				var left = Canvas.GetLeft(content);
				var top = Canvas.GetTop(content);
				var bottom = Canvas.GetBottom(content);
				var right = Canvas.GetRight(content);

				if (left.IsNaN() && right.IsNaN() && bottom.IsNaN() && top.IsNaN())
				{
					Canvas.SetBottom(content, 10.0);
					Canvas.SetRight(content, 10.0);
				}
				plotter.MainCanvas.Children.Add(Content);
			}
		}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:28,代码来源:ViewportUIContainer.cs


示例3: OnPlotterAttached

		protected override void OnPlotterAttached(Plotter plotter)
		{
			// removing restrictions previously added by base class Map, as in case of rendering to texture they
			// are not relevant
			Plotter.Viewport.Restrictions.Remove(base.ProportionsRestriction);
			Plotter.Viewport.Restrictions.Remove(base.MaxSizeRestriction);
		}
开发者ID:modulexcite,项目名称:DynamicDataDisplay,代码行数:7,代码来源:RenderingMap.cs


示例4: OnPlotterAttached

		public void OnPlotterAttached(Plotter plotter)
		{
			this.plotter = (Plotter2D)plotter;
			
			Panel panel = GetPanel(plotter);
			panel.Children.Add(this);
		}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:7,代码来源:PlotterPanelBase.cs


示例5: OnPlotterDetaching

		public void OnPlotterDetaching(Plotter plotter)
		{
			Panel panel = GetPanel(plotter);
			panel.Children.Remove(this);

			this.plotter = null;
		}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:7,代码来源:PlotterPanelBase.cs


示例6: AttachCore

		protected override void AttachCore(PointSelector selector, Plotter plotter)
		{
			if (selector == null)
				throw new ArgumentNullException("selector");
			if (plotter == null)
				throw new ArgumentNullException("plotter");

			this.selector = selector;
			this.plotter = (Plotter2D)plotter;
			var transform = this.plotter.Transform;

			// copying all markers from marker chart to InkCanvas to enable their selection
			foreach (FrameworkElement marker in selector.MarkerChart.Items)
			{
				var xamlString = XamlWriter.Save(marker);
				var markerCopy = (FrameworkElement)XamlReader.Parse(xamlString);

				var x = ViewportPanel.GetX(marker);
				var y = ViewportPanel.GetY(marker);
				Point position = new Point(x, y);
				var positionInScreen = position.ViewportToScreen(transform);

				if (!marker.IsMeasureValid)
					marker.Measure(new Size(Double.PositiveInfinity, Double.PositiveInfinity));

				InkCanvas.SetLeft(markerCopy, positionInScreen.X - marker.Width / 2);
				InkCanvas.SetTop(markerCopy, positionInScreen.Y - marker.Height / 2);
				markerCopy.DataContext = marker.DataContext;

				inkCanvas.Children.Add(markerCopy);
			}

			plotter.CentralGrid.Children.Add(inkCanvas);
		}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:34,代码来源:MultipleSelectHandler.cs


示例7: OnPlotterAttached

        public override void OnPlotterAttached(Plotter plotter)
        {
            base.OnPlotterAttached(plotter);

            timer = new System.Windows.Threading.DispatcherTimer();
            timer.Tick += new EventHandler(timer_Tick);
            timer.Interval = TimeSpan.FromMilliseconds(1);



            plotter.CentralGrid.MouseLeftButtonDown += new MouseButtonEventHandler(CentralGrid_MouseLeftButtonDown);
            plotter.CentralGrid.MouseLeftButtonUp += new MouseButtonEventHandler(CentralGrid_MouseLeftButtonUp);

            plotter.CentralGrid.MouseMove += new MouseEventHandler(CentralGrid_MouseMove);
            plotter.CentralGrid.MouseWheel += new MouseWheelEventHandler(CentralGrid_MouseWheel);
            plotter.CentralGrid.MouseLeave += new MouseEventHandler(CentralGrid_MouseLeave);
            //plotter.CentralGrid.MouseEnter += new MouseEventHandler(CentralGrid_MouseEnter);
            plotter.KeyDown += new KeyEventHandler(plotter_KeyDown);
            plotter.KeyUp += new KeyEventHandler(plotter_KeyUp);

            zoomingRect.Stroke = new SolidColorBrush(Colors.LightGray);
            Color fillColor = new Color();
            fillColor.A = 40;
            fillColor.R = 0x80;
            fillColor.G = 0x80;
            fillColor.B = 0x80;
            zoomingRect.RadiusX = 2;
            zoomingRect.RadiusY = 2;

            zoomingRect.Fill = new SolidColorBrush(fillColor);
        }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:31,代码来源:MouseNavigation.cs


示例8: OnPlotterAttached

		public override void OnPlotterAttached(Plotter plotter)
		{
			Plotter = (Plotter2D)plotter;
			plotter.LeftPanel.Children.Insert(0, polygon);

			RebuildUI();
		}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:7,代码来源:VerticalCrossSectionChart.cs


示例9: Style

		void IPlotterElement.OnPlotterAttached(Plotter plotter)
		{
			this.plotter = (Plotter2D)plotter;

			this.plotter.Viewport.PropertyChanged += Viewport_PropertyChanged;

			var parent = plotter.MainGrid;
			parent.MouseMove += parent_MouseMove;
			parent.MouseEnter += parent_MouseEnter;
			parent.MouseLeave += parent_MouseLeave;

			Style lineStyle = new Style(typeof(Line));
			AddBindingSetter(lineStyle, Line.StrokeProperty);
			AddBindingSetter(lineStyle, Line.StrokeThicknessProperty);

			leftCanvas = new Canvas();
			Grid.SetRow(leftCanvas, 1);
			Grid.SetColumn(leftCanvas, 0);
			leftLine = new Line { Style = lineStyle, IsHitTestVisible = false };
			leftCanvas.Children.Add(leftLine);
			parent.Children.Add(leftCanvas);

			bottomCanvas = new Canvas();
			Grid.SetRow(bottomCanvas, 2);
			Grid.SetColumn(bottomCanvas, 1);
			bottomLine = new Line { Style = lineStyle, IsHitTestVisible = false };
			bottomCanvas.Children.Add(bottomLine);
			parent.Children.Add(bottomCanvas);
		}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:29,代码来源:AxisCursorGraph.cs


示例10: OnPlotterAttached

		public override void OnPlotterAttached(Plotter plotter)
		{
			Plotter = (Plotter2D)plotter;
			plotter.BottomPanel.Children.Add(polygon);

			RebuildUI();
		}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:7,代码来源:HorizontalCrossSectionChart.cs


示例11: AttachCore

		protected override void AttachCore(RectangleSelector selector, Plotter plotter)
		{
			base.AttachCore(selector, plotter);

			Plotter.CentralGrid.MouseLeftButtonDown += OnMouseLeftButtonDown;
			Plotter.CentralGrid.MouseLeftButtonUp += OnMouseLeftButtonUp;
			Plotter.CentralGrid.MouseMove += OnMouseMove;
		}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:8,代码来源:ClickAndDragHandler.cs


示例12: OnPlotterAttached

		void IPlotterElement.OnPlotterAttached(Plotter plotter)
		{
			this.plotter = (Plotter2D)plotter;
			HostPanel.Children.Add(this);
			this.plotter.Viewport.PropertyChanged += Viewport_PropertyChanged;

			OnPlotterAttached();
		}
开发者ID:BdGL3,项目名称:CXPortal,代码行数:8,代码来源:ContentGraph.cs


示例13: TextPainter

 public TextPainter(Plotter plotter, IFont font, int sizeX, int sizeY, int spaceX)
 {
     this.plotter = plotter;
     this.font = font;
     this.sizeX = sizeX;
     this.sizeY = sizeY;
     this.spaceX = spaceX;
 }
开发者ID:Alias007,项目名称:InternetOfThings,代码行数:8,代码来源:TextPainter.cs


示例14: OnPlotterAttached

		public void OnPlotterAttached(Plotter plotter)
		{
			this.plotter = (Plotter2D)plotter;
			plotter.Dispatcher.BeginInvoke(() =>
			{
				plotter.Children.Add(panel);
			});
		}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:8,代码来源:VisualDebug.cs


示例15: OnPlotterDetaching

		void IPlotterElement.OnPlotterDetaching(Plotter plotter)
		{
			OnPlotterDetaching();

			this.plotter.Viewport.PropertyChanged -= Viewport_PropertyChanged;
			HostPanel.Children.Remove(this);
			this.plotter = null;
		}
开发者ID:BdGL3,项目名称:CXPortal,代码行数:8,代码来源:ContentGraph.cs


示例16: OnPlotterAttached

		public void OnPlotterAttached(Plotter plotter)
		{
			this.plotter = plotter;
			if (type != null)
			{
				plotter.Children.RemoveAll(type);
			}
		}
开发者ID:BdGL3,项目名称:CXPortal,代码行数:8,代码来源:RemoveAll.cs


示例17: OnPlotterDetaching

		public void OnPlotterDetaching(Plotter plotter)
		{
			plotter.Dispatcher.BeginInvoke(() =>
			{
				plotter.Children.Remove(panel);
			});

			this.plotter = null;
		}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:9,代码来源:VisualDebug.cs


示例18: DetachFromPlotter

		private void DetachFromPlotter(Plotter plotter)
		{
			if (plotter != null)
			{
				plotter.Children.CollectionChanged -= PlotterChildren_CollectionChanged;
				this.plotter = null;
				CleanLegend();
			}
		}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:9,代码来源:Legend.cs


示例19: OnPlotterAttached

		public virtual void OnPlotterAttached(Plotter plotter)
		{
			this.plotter = (Plotter2D)plotter;
			plotter.Children.BeginAdd(panel);

			SetBinding(DataContextProperty, new Binding("DataContext") { Source = panel });

			RebuildUI();
		}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:9,代码来源:VectorFieldChartBase.cs


示例20: AttachToPlotter

		private void AttachToPlotter(Plotter plotter)
		{
			if (plotter != this.plotter)
			{
				this.plotter = plotter;
				plotter.Children.CollectionChanged += PlotterChildren_CollectionChanged;
				PopulateLegend();
			}
		}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:9,代码来源:Legend.cs



注:本文中的Plotter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Plug类代码示例发布时间:2022-05-24
下一篇:
C# PlotModel类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap