当前位置: 首页>>代码示例>>C#>>正文


C# GraphPane.AxisChange方法代码示例

本文整理汇总了C#中UIGraphLib.GraphPane.AxisChange方法的典型用法代码示例。如果您正苦于以下问题:C# GraphPane.AxisChange方法的具体用法?C# GraphPane.AxisChange怎么用?C# GraphPane.AxisChange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UIGraphLib.GraphPane的用法示例。


在下文中一共展示了GraphPane.AxisChange方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ResetAutoScale

        /// <summary>
        /// Restore the scale ranging to automatic mode, and recalculate the
        /// <see c_ref="Axis"/> scale ranges
        /// </summary>
        /// <param name="pane">
        /// A reference to the <see c_ref="GraphPane"/> object that is the parent or
        /// owner of this object.
        /// </param>
        /// <param name="g">
        /// A graphic device object to be drawn into.  This is normally e.Graphics from the
        /// PaintEventArgs argument to the Paint() method.
        /// </param>
        /// <seealso c_ref="ZedGraph.Scale.MinAuto"/>
        /// <seealso c_ref="ZedGraph.Scale.MaxAuto"/>
        /// <seealso c_ref="ZedGraph.Scale.MajorStepAuto"/>
        /// <seealso c_ref="ZedGraph.Scale.MagAuto"/>
        /// <seealso c_ref="ZedGraph.Scale.FormatAuto"/>
        public void ResetAutoScale( GraphPane pane, Graphics g )
		{
			_scale._minAuto = true;
			_scale._maxAuto = true;
			_scale._majorStepAuto = true;
			_scale._minorStepAuto = true;
			_crossAuto = true;
			_scale._magAuto = true;
			//this.numDecAuto = true;
			_scale._formatAuto = true;
			pane.AxisChange( g );
		}
开发者ID:CareyGit,项目名称:jx,代码行数:29,代码来源:Axis.cs

示例2: GraphControl

		/// <summary>
		/// Default Constructor
		/// </summary>
		public GraphControl()
		{
			InitializeComponent();

			// These commands do nothing, but they get rid of the compiler warnings for
			// unused events
			bool b = MouseDown == null || MouseUp == null || MouseMove == null;

			// Link in these events from the base class, since we disable them from this class.
			base.MouseDown += ZedGraphControl_MouseDown;
			base.MouseUp += ZedGraphControl_MouseUp;
			base.MouseMove += ZedGraphControl_MouseMove;

			//this.MouseWheel += new System.Windows.Forms.MouseEventHandler( this.ZedGraphControl_MouseWheel );

			// Use double-buffering for flicker-free updating:
			SetStyle( ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint
				| ControlStyles.DoubleBuffer | ControlStyles.ResizeRedraw, true );
			//isTransparentBackground = false;
			//SetStyle( ControlStyles.Opaque, false );
			SetStyle( ControlStyles.SupportsTransparentBackColor, true );
			//this.BackColor = Color.Transparent;

            _resourceManager = new ResourceManager("UIGraphLib.GraphLocale",
				Assembly.GetExecutingAssembly() );

			Rectangle rect = new Rectangle( 0, 0, Size.Width, Size.Height );
			_masterPane = new MasterPane( "", rect );
			_masterPane.Margin.All = 0;
			_masterPane.Title.IsVisible = false;

			string titleStr = _resourceManager.GetString( "title_def" );
			string xStr = _resourceManager.GetString( "x_title_def" );
			string yStr = _resourceManager.GetString( "y_title_def" );

			//GraphPane graphPane = new GraphPane( rect, "Title", "X Axis", "Y Axis" );
			GraphPane graphPane = new GraphPane( rect, titleStr, xStr, yStr );
			using ( Graphics g = CreateGraphics() )
			{
				graphPane.AxisChange( g );
				//g.Dispose();
			}
			_masterPane.Add( graphPane );

			hScrollBar1.Minimum = 0;
			hScrollBar1.Maximum = 100;
			hScrollBar1.Value = 0;

			vScrollBar1.Minimum = 0;
			vScrollBar1.Maximum = 100;
			vScrollBar1.Value = 0;

			_xScrollRange = new ScrollRange( true );
			_yScrollRangeList = new ScrollRangeList();
			_y2ScrollRangeList = new ScrollRangeList();

			_yScrollRangeList.Add( new ScrollRange( true ) );
			_y2ScrollRangeList.Add( new ScrollRange( false ) );

			_zoomState = null;
			_zoomStateStack = new ZoomStateStack();
		}
开发者ID:CareyGit,项目名称:jx,代码行数:65,代码来源:GraphControl.cs

示例3: ZoomPane

		/// <summary>
		/// Zoom a specified pane in or out according to the specified zoom fraction.
		/// </summary>
		/// <remarks>
		/// The zoom will occur on the <see c_ref="XAxis" />, <see c_ref="YAxis" />, and
		/// <see c_ref="Y2Axis" /> only if the corresponding flag, <see c_ref="IsEnableHZoom" /> or
		/// <see c_ref="IsEnableVZoom" />, is true.  Note that if there are multiple Y or Y2 axes, all of
		/// them will be zoomed.
		/// </remarks>
		/// <param name="pane">The <see c_ref="GraphPane" /> instance to be zoomed.</param>
		/// <param name="zoomFraction">The fraction by which to zoom, less than 1 to zoom in, greater than
		/// 1 to zoom out.  For example, 0.9 will zoom in such that the scale is 90% of what it was
		/// originally.</param>
		/// <param name="centerPt">The screen position about which the zoom will be centered.  This
		/// value is only used if <see paramref="isZoomOnCenter" /> is true.
		/// </param>
		/// <param name="isZoomOnCenter">true to cause the zoom to be centered on the point
		/// <see paramref="centerPt" />, false to center on the <see c_ref="Chart.Rect" />.
		/// </param>
		/// <param name="isRefresh">true to force a refresh of the control, false to leave it unrefreshed</param>
		protected void ZoomPane( GraphPane pane, double zoomFraction, PointF centerPt,
					bool isZoomOnCenter, bool isRefresh )
		{
			double x;
			double x2;
			double[] y;
			double[] y2;

			pane.ReverseTransform( centerPt, out x, out x2, out y, out y2 );

			if ( _isEnableHZoom )
			{
				ZoomScale( pane.XAxis, zoomFraction, x, isZoomOnCenter );
				ZoomScale( pane.X2Axis, zoomFraction, x2, isZoomOnCenter );
			}
			if ( _isEnableVZoom )
			{
				for ( int i = 0; i < pane.YAxisList.Count; i++ )
					ZoomScale( pane.YAxisList[i], zoomFraction, y[i], isZoomOnCenter );
				for ( int i = 0; i < pane.Y2AxisList.Count; i++ )
					ZoomScale( pane.Y2AxisList[i], zoomFraction, y2[i], isZoomOnCenter );
			}

			using ( Graphics g = CreateGraphics() )
			{
				pane.AxisChange( g );
				//g.Dispose();
			}

			SetScroll( hScrollBar1, pane.XAxis, _xScrollRange.Min, _xScrollRange.Max );
			SetScroll( vScrollBar1, pane.YAxis, _yScrollRangeList[0].Min,
				_yScrollRangeList[0].Max );

			if ( isRefresh )
				Refresh();
		}
开发者ID:CareyGit,项目名称:jx,代码行数:56,代码来源:GraphControl.Events.cs


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