cposition.cs

来自「苏金明编写的《用VB.NET和VC#.NET开发交互式CAD系统》一书的源代码」· CS 代码 · 共 41 行

CS
41
字号
using System;
using System.Drawing;

namespace Serialize
{
	/// <summary>
	/// CPosition 的摘要说明。
	/// </summary>
	[Serializable()]public class CPosition
	{

		private float m_x,m_y;

		public float x{
			get{return m_x;}
			set{m_x=value;}
		}

		public float y
		{
			get{return m_y;}
			set{m_y=value;}
		}
		
		public CPosition()
		{
		}

		public CPosition(float x,float y)
		{
			m_x=x;
			m_y=y;
		}

		public void Draw(Graphics g)
		{
			g.DrawEllipse(Pens.Blue,m_x-3,m_y-3,6,6);
		}
	}
}

⌨️ 快捷键说明

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