⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chartaxis.cs

📁 C#自定义查询控件
💻 CS
字号:
// Disclaimer and Copyright Information
// ChartAxis.cs : 
//
// All rights reserved.
//
// Written by Pardesi Services, LLC
// Version 1.01
//
// Distribute freely, except: don't remove our name from the source or
// documentation (don't take credit for my work), mark your changes (don't
// get me blamed for your possible bugs), don't alter or remove this
// notice.
// No warrantee of any kind, express or implied, is included with this
// software; use at your own risk, responsibility for damages (if any) to
// anyone resulting from the use of this software rests entirely with the
// user.
//
// Send bug reports, bug fixes, enhancements, requests, flames, etc. to
// softomatix@CommonComponent.com
///////////////////////////////////////////////////////////////////////////////
//

using System;
using System.Drawing;

namespace CommonComponent.CommonChart
{
	/*
	 *							Y1
	 *							|
	 *				Quad2		|	Quad1
	 *							|
	 *							|O
	 *			X1-------------------------------X2
	 *							|
	 *				Quad3		|	Quad4
	 *							|
	 *							|
	 *							Y2
	 * 
	 */

	/// <summary>
	/// 
	/// </summary>
	public class ChartAxis
	{
		protected Point m_O;
		protected Point m_X1;
		protected Point m_X2;
		protected Point m_Y1;
		protected Point m_Y2;

		/// <summary>
		/// 
		/// </summary>
		public ChartAxis()
		{
			InitializeMembers();
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="origin"></param>
		/// <param name="x1"></param>
		/// <param name="x2"></param>
		/// <param name="y1"></param>
		/// <param name="y2"></param>
		public ChartAxis(Point origin, Point x1, Point x2, Point y1, Point y2)
		{
			m_O = new Point(origin.X, origin.Y);
			m_X1 = new Point(x1.X, x1.Y);
			m_X2 = new Point(x2.X, x2.Y);
			m_Y1 = new Point(y1.X, y1.Y);
			m_Y2 = new Point(y2.X, y2.Y);
		}

		public Point Origin
		{
			get
			{
				return this.m_O;
			}
			set
			{
				m_O.X = ((Point)value).X;
				m_O.Y = ((Point)value).Y;
			}
		}

		public Point X1
		{
			get
			{
				return this.m_X1;
			}
			set
			{
				m_X1.X = ((Point)value).X;
				m_X1.Y = ((Point)value).Y;
			}
		}

		public Point X2
		{
			get
			{
				return this.m_X2;
			}
			set
			{
				m_X2.X = ((Point)value).X;
				m_X2.Y = ((Point)value).Y;
			}
		}

		public Point Y1
		{
			get
			{
				return this.m_Y1;
			}
			set
			{
				m_Y1.X = ((Point)value).X;
				m_Y1.Y = ((Point)value).Y;
			}
		}

		public Point Y2
		{
			get
			{
				return this.m_Y2;
			}
			set
			{
				m_Y2.X = ((Point)value).X;
				m_Y2.Y = ((Point)value).Y;
			}
		}

		private void InitializeMembers()
		{
			m_O = new Point(0, 0);
			m_X1 = new Point(0, 0);
			m_X2 = new Point(0,0);
			m_Y1 = new Point(0, 0);
			m_Y2 = new Point(0, 0);
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -