Esempio n. 1
0
        static void Main(string[] args)
        {
            var drawCircle = new DrawCircle();
            var drawSquare = new DrawSquare();

            var draw = new DrawFigure(drawCircle);

            draw.Draw();
            var draw1 = new DrawFigure(drawSquare);

            draw1.Draw();
        }
Esempio n. 2
0
 public void MouseMove(PictureBox sheet, IBrush brush, MouseEventArgs e)
 {
     figure.Createdotlist(x1, y1, x2, y2);
     if (cursorActive == true)
     {
         Canva.GetCanva.LoadFromCache();
         x2 = e.X;
         y2 = e.Y;
         DrawFigure drawer = new DrawFigure(figure, brush);
         drawer.Draw();
         Canva.GetCanva.WriteToPictureBox(sheet);
     }
 }