/// <summary>
/// Required method for Designer support — do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent ()
{
// Код, инициализирующий компоненты и построенный
// дизайнером, опущен
}
#endregion
/// <summary>
/// Точка входа в приложение — процедура Main,
/// запускающая форму
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void menuItem7_Click(object sender, System.EventArgs e)
{
createEllipse ();
}
void createEllipse ()
{
//clear old figure
if (current!= null) current.Show(graphic, clearPen, clearBrush);
//create ellipse
current = new Ellipse (50, 30, 180,180);
}
private void menuItem8_Click(object sender, System.EventArgs e)
{
createCircle ();
}
void createCircle ()
{
//clear old figure
if (current!= null) current.Show(graphic, clearPen, clearBrush);
//create circle
current = new Circle (30, 180, 180);
}
private void menuItem9_Click(object sender, System.EventArgs e)
{
createLittleCircle ();
}
void createLittleCircle ()
{
//clear old figure
if (current!= null) current.Show(graphic, clearPen, clearBrush);
//create littlecircle
current = new Littlecircle (180, 180);
}
private void menuItem10_Click(object sender, System.EventArgs e)
{
createRectangle ();
}
void createRectangle ()
{
//clear old figure
if (current!= null) current.Show(graphic, clearPen, clearBrush);
//create rectangle current = new Rect(50, 30, 180,180);
}
private void menuItem11_Click(object sender, System.EventArgs e)
{
createSquare();
}
void createSquare()
{
//clear old figure
if (current!= null) current.Show(graphic, clearPen, clearBrush);
//create square
current = new Square(30, 180,180);
}
private void menuItem12_Click (object sender, System.EventArgs e)
{
createPerson ();
}
void createPerson ()
}
//clear old figure
if (current!= null) current.Show(graphic, clearPen, clearBrush);
//create person
current = new Person (20, 180, 180);
}
private void menuItem13_Click(object sender, System.EventArgs e)
{
showCurrent ();
}
void showCurrent()
{
//Show current
current.Show(graphic, pen, brush);
}
private void menuItem14_Click(object sender, System.EventArgs e)
{
clearCurrent ();
}
void clearCurrent()
{
//Clear current
current.Show(graphic, clearPen, clearBrush)
}
private void menuItem17_Click(object sender, System.EventArgs e)
{
incScale ();
}
void incScale ()
{
//Increase scale
current.Show(graphic, clearPen, clearBrush)
current.Scale (1.5);
current.Show(graphic, pen, brush);
}
private void menuItem18_Click(object sender, System.EventArgs e)
{
decScale ();
}
void decScale()
{
//Decrease scale
current.Show(graphic, clearPen, clearBrush)
current.Scale(2.0/3);
current.Show(graphic, pen, brush);
}
private void menuItem19_Click(object sender, System.EventArgs e)
{
moveLeft ();
}
void moveLeft()
{
//Move left