public MainForm() { InitializeComponent(); objects = new List <DrawObject>(); currentObject = null; isDrawing = false; rectangleToolStripMenuItem.Click += InitialiseTool; ellipseToolStripMenuItem.Click += InitialiseTool; lineToolStripMenuItem.Click += InitialiseTool; }
private void rectangleToolStripMenuItem_Click(object sender, EventArgs e) { currentObject = new Rectangle(); }
private void lineToolStripMenuItem_Click(object sender, EventArgs e) { currentObject = new Line(); }
private void ellipseToolStripMenuItem_Click(object sender, EventArgs e) { currentObject = new Ellipse(); }