예제 #1
0
        public MainForm()
        {
            InitializeComponent();

            objects       = new List <DrawObject>();
            currentObject = null;
            isDrawing     = false;

            rectangleToolStripMenuItem.Click += InitialiseTool;
            ellipseToolStripMenuItem.Click   += InitialiseTool;
            lineToolStripMenuItem.Click      += InitialiseTool;
        }
예제 #2
0
 private void rectangleToolStripMenuItem_Click(object sender, EventArgs e)
 {
     currentObject = new Rectangle();
 }
예제 #3
0
 private void lineToolStripMenuItem_Click(object sender, EventArgs e)
 {
     currentObject = new Line();
 }
예제 #4
0
 private void ellipseToolStripMenuItem_Click(object sender, EventArgs e)
 {
     currentObject = new Ellipse();
 }