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

📄 shape.cs

📁 Csharp设计模式图书加源代码是csharp程序员学习模式编程的一本好书
💻 CS
字号:
using System;
using System.Drawing ;
namespace CsharpPats
{
	/// <summary>
	/// Summary description for Shape.
	/// </summary>
	public abstract class Shape 	{
		protected int height, width;
		protected int xpos, ypos;
		protected Pen bPen;
		//-----
		public Shape(int x, int y, int h, int w)	{
			width = w;
			height = h;
			xpos = x;
			ypos = y;
			bPen = new Pen(Color.Black );
		}
		//-----
		public abstract void draw(Graphics g);
		//-----
		public virtual float getArea() {
			return height * width;
		}
	}
}

⌨️ 快捷键说明

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