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(); }
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); } }