structs.cs

来自「Fireball.CodeEditor is an source code ed」· CS 代码 · 共 73 行

CS
73
字号
using System;

namespace Fireball.Syntax
{
	/// <summary>
	/// Class representing a point in a text.
	/// where x is the column and y is the row.
	/// </summary>
	public class TextPoint
	{
		private int x = 0;
		private int y = 0;

		/// <summary>
		/// Event fired when the X or Y property has changed.
		/// </summary>
		public event EventHandler Change = null;

		private void OnChange()
		{
			if (Change != null)
				Change(this, new EventArgs());
		}

		/// <summary>
		/// 
		/// </summary>
		public TextPoint()
		{
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="X"></param>
		/// <param name="Y"></param>
		public TextPoint(int X, int Y)
		{
			this.X = X;
			this.Y = Y;
		}

		/// <summary>
		/// 
		/// </summary>
		public int X
		{
			get { return x; }
			set
			{
				x = value;
				OnChange();
			}

		}

		/// <summary>
		/// 
		/// </summary>
		public int Y
		{
			get { return y; }
			set
			{
				y = value;
				OnChange();
			}
		}


	}

}

⌨️ 快捷键说明

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