Beispiel #1
0
 public override void AddShape()
 {
     Point point1 = new Point(int.Parse(Point1X.Text), int.Parse(Point1Y.Text));
     Point point2 = new Point(int.Parse(Point2X.Text), int.Parse(Point2Y.Text));
     Segment segment = new Segment(new PolygonVisitor(), point1, point2);
     ShapesList.AddShape(segment);
     Clean();
     MessageBox.Show(@"Success");
 }
Beispiel #2
0
        public override void AddShape()
        {
            Point     point1    = new Point(int.Parse(Point1X.Text), int.Parse(Point1Y.Text));
            Rectangle rectangle = new Rectangle(new PolygonVisitor(), point1, int.Parse(Width.Text), int.Parse(Height.Text));

            ShapesList.AddShape(rectangle);
            MessageBox.Show(@"Success");
            Clean();
        }
Beispiel #3
0
        public override void AddShape()
        {
            Point  topleft = new Point(int.Parse(Point1X.Text), int.Parse(Point1Y.Text));
            Square square  = new Square(topleft, int.Parse(Width.Text));

            ShapesList.AddShape(square);
            MessageBox.Show(@"Success");
            Clean();
        }
Beispiel #4
0
        public override void AddShape()
        {
            int    radius  = int.Parse(RadiusX.Text);
            Point  topLeft = new Point(int.Parse(X.Text) - radius, int.Parse(Y.Text) - radius);
            Circle circle  = new Circle(topLeft, radius);

            ShapesList.AddShape(circle);
            MessageBox.Show(@"Success");
            Clean();
        }
Beispiel #5
0
        public override void AddShape()
        {
            Point    point1   = new Point(int.Parse(Point1X.Text), int.Parse(Point1Y.Text));
            Point    point2   = new Point(int.Parse(Point2X.Text), int.Parse(Point2Y.Text));
            Point    point3   = new Point(int.Parse(Point3X.Text), int.Parse(Point3Y.Text));
            Triangle triangle = new Triangle(point1, point2, point3);

            ShapesList.AddShape(triangle);
            MessageBox.Show(@"Success");
            Clean();
        }
Beispiel #6
0
        public override void AddShape()
        {
            Point point1 = new Point(int.Parse(Point1X.Text), int.Parse(Point1Y.Text));
            Point point2 = new Point(int.Parse(Point2X.Text), int.Parse(Point2Y.Text));
            Point point3 = new Point(int.Parse(Point3X.Text), int.Parse(Point3Y.Text));
            Angle angle  = new Angle(new DrawPolyline(), point1, point2, point3);

            ShapesList.AddShape(angle);
            MessageBox.Show(@"Success");
            Clean();
        }
Beispiel #7
0
        public override void AddShape()
        {
            int     radiusX = int.Parse(RadiusX.Text);
            int     radiusY = int.Parse(RadiusY.Text);
            Point   topLeft = new Point(int.Parse(X.Text) - radiusX, int.Parse(Y.Text) - radiusY);
            Ellipse ellipse = new Ellipse(topLeft, radiusX * 2, radiusY * 2);

            ShapesList.AddShape(ellipse);
            MessageBox.Show(@"Success");
            Clean();
        }