Exemple #1
0
 private void Form1_MouseClick(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left && textFigureSelected)
     {
         startPoint    = e.Location;
         text          = textBox1.Text;
         drawingEditor = new DrawingEditor(new TextShape(startPoint, text));
         drawingEditor.Draw();
         Controls.Add(drawingEditor.Manipulator);
         Refresh();
     }
 }
Exemple #2
0
 private void Form1_MouseUp(object sender, MouseEventArgs e)
 {
     if (mouseButtonPressed && lineFigureSelected)
     {
         endPoint      = e.Location;
         drawingEditor = new DrawingEditor(new Line(startPoint, endPoint));
         drawingEditor.Draw();
         Controls.Add(drawingEditor.Manipulator);
         Refresh();
     }
     mouseButtonPressed = false;
 }