?? shape.cs
字號(hào):
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;
}
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -