DrawShape() public method

public DrawShape ( IShape shape ) : void
shape IShape
return void
Esempio n. 1
0
        public static void Main()
        {
            var graphicEditor = new GraphicEditor();

            Console.WriteLine(graphicEditor.DrawShape(new Rectangle()));
            Console.WriteLine(graphicEditor.DrawShape(new Circle()));
            Console.WriteLine(graphicEditor.DrawShape(new Square()));
        }
Esempio n. 2
0
        static void Main()
        {
            GraphicEditor graphicEditor = new GraphicEditor();

            graphicEditor.DrawShape(new Circle());
            graphicEditor.DrawShape(new Square());
            graphicEditor.DrawShape(new Rectangle());
        }
Esempio n. 3
0
        public static void Main()
        {
            var editor = new GraphicEditor();

            editor.DrawShape(new Circle());
            editor.DrawShape(new Rectangle());
            editor.DrawShape(new Square());
            editor.DrawShape(new Octagon());
        }
Esempio n. 4
0
        static void Main()
        {
            IDrawable     rectangle     = new Rectangle();
            IDrawable     circle        = new Circle();
            GraphicEditor graphicEditor = new GraphicEditor();

            graphicEditor.DrawShape(circle);
            graphicEditor.DrawShape(rectangle);
        }
Esempio n. 5
0
        static void Main()
        {
            var circle = new Circle();
            var square = new Square();

            var editor = new GraphicEditor();

            editor.DrawShape(circle);
            editor.DrawShape(square);
        }
Esempio n. 6
0
        public static void Main()
        {
            GraphicEditor graphicEditor = new GraphicEditor();

            Square square = new Square();

            graphicEditor.DrawShape(square);

            graphicEditor.DrawShape(new Rectangle());
        }
Esempio n. 7
0
        static void Main()
        {
            IShape        circle    = new Circle();
            IShape        rectangle = new Rectangle();
            IShape        square    = new Square();
            GraphicEditor editor    = new GraphicEditor();

            editor.DrawShape(circle);
            editor.DrawShape(rectangle);
            editor.DrawShape(square);
        }
Esempio n. 8
0
        static void Main()
        {
            var graphicEditor = new GraphicEditor();
            var circle        = new Circle();
            var rectangle     = new Rectangle();
            var square        = new Square();

            graphicEditor.DrawShape(circle);
            graphicEditor.DrawShape(rectangle);
            graphicEditor.DrawShape(square);
        }
Esempio n. 9
0
        static void Main()
        {
            IShape shapeRectangle = new Rectangle();
            IShape shapeSquare    = new Square();
            IShape shapeCircle    = new Circle();

            GraphicEditor graphicEditor = new GraphicEditor();

            graphicEditor.DrawShape(shapeRectangle);
            graphicEditor.DrawShape(shapeSquare);
            graphicEditor.DrawShape(shapeCircle);
        }
Esempio n. 10
0
        static void Main()
        {
            Circle        circle = new Circle("I'm a circle");
            GraphicEditor editor = new GraphicEditor();

            editor.DrawShape(circle);
            Rectangle rectangle = new Rectangle("I'm a rectangle");

            editor.DrawShape(rectangle);
            Square square = new Square("I'm a square");

            editor.DrawShape(square);
        }
Esempio n. 11
0
        static void Main()
        {
            var gE        = new GraphicEditor();
            var circle    = new Circle();
            var rectangle = new Rectangle();
            var square    = new Square();
            var polygon   = new Polygon();

            gE.DrawShape(circle);
            gE.DrawShape(rectangle);
            gE.DrawShape(square);
            gE.DrawShape(polygon);
        }
Esempio n. 12
0
        static void Main()
        {
            Circle    circle = new Circle();
            Rectangle rec    = new Rectangle();
            Square    square = new Square();
            Piramid   piamid = new Piramid();

            GraphicEditor graphicEditor = new GraphicEditor();

            graphicEditor.DrawShape(circle);
            graphicEditor.DrawShape(rec);
            graphicEditor.DrawShape(square);
            graphicEditor.DrawShape(piamid);
        }
Esempio n. 13
0
        static void Main()
        {
            GraphicEditor editor = new GraphicEditor();

            IShape rectangle = new Rectangle();
            IShape square    = new Square();
            IShape circle    = new Circle();
            IShape triangle  = new Triangle();

            Console.WriteLine(editor.DrawShape(rectangle));
            Console.WriteLine(editor.DrawShape(square));
            Console.WriteLine(editor.DrawShape(circle));
            Console.WriteLine(editor.DrawShape(triangle));
        }
Esempio n. 14
0
        static void Main()
        {
            IShape        rec    = new Square();
            GraphicEditor editor = new GraphicEditor();

            editor.DrawShape(rec);
        }
Esempio n. 15
0
        public static void Main()
        {
            GraphicEditor graphicEditor = new GraphicEditor();
            Circle        circle        = new Circle();

            graphicEditor.DrawShape(circle);
        }
        static void Main()
        {
            var circle       = new Circle();
            var graficEditor = new GraphicEditor();

            graficEditor.DrawShape(circle);
        }
Esempio n. 17
0
        static void Main()
        {
            GraphicEditor ge = new GraphicEditor();

            Circle circle = new Circle();

            ge.DrawShape(circle);

            Rectangle rectangle = new Rectangle();

            ge.DrawShape(rectangle);

            IShape squareShape = new Square();

            ge.DrawShape(squareShape);
        }
Esempio n. 18
0
        static void Main()
        {
            IShape shape = new Circle();

            GraphicEditor grEd = new GraphicEditor();

            grEd.DrawShape(shape);
        }
Esempio n. 19
0
        static void Main()
        {
            GraphicEditor graphicEditor = new GraphicEditor();

            IShape shape = new Square();

            graphicEditor.DrawShape(shape);

            shape = new Rectangle();
            graphicEditor.DrawShape(shape);

            shape = new Circle();
            graphicEditor.DrawShape(shape);

            shape = new Triangle();
            graphicEditor.DrawShape(shape);
        }
Esempio n. 20
0
        static void Main()
        {
            GraphicEditor graphicEditor = new GraphicEditor();

            IShape shapeC = new Circle();
            IShape shapeR = new Rectangle();
            IShape shapeS = new Square();

            graphicEditor.DrawShape(shapeS);
        }
Esempio n. 21
0
        static void Main()
        {
            List <IShape> shapes = new List <IShape>();

            shapes.Add(new Rectangle());
            shapes.Add(new Circle());
            GraphicEditor graphicEditor = new GraphicEditor();

            foreach (var item in shapes)
            {
                graphicEditor.DrawShape(item);
            }
        }
Esempio n. 22
0
        static void Main()
        {
            GraphicEditor graphicEditor = new GraphicEditor();
            List <IShape> shapes        = new List <IShape>()
            {
                new Circle(), new Polygon(), new Rectangle(), new Square()
            };

            foreach (var shape in shapes.OrderBy(sh => sh.Type))
            {
                graphicEditor.DrawShape(shape);
            }
        }
Esempio n. 23
0
        static void Main()
        {
            //1
            IShape        circle         = new Circle();
            GraphicEditor myGrphicEditor = new GraphicEditor(circle);

            myGrphicEditor.DrawShape();

            //2
            //IShape rectangle = new Rectangle();
            //GraphicEditor myGrphicEditor = new GraphicEditor();

            //myGrphicEditor.DrawShape(rectangle);
        }
Esempio n. 24
0
        public static void Main()
        {
            var shapes = new List <IShape>();

            shapes.Add(new Circle());
            shapes.Add(new Square());
            shapes.Add(new Rectangle());
            shapes.Add(new Pyramid());

            var graphicEditor = new GraphicEditor();

            foreach (var shape in shapes)
            {
                graphicEditor.DrawShape(shape);
            }
        }
Esempio n. 25
0
        static void Main()
        {
            List <IShape> figures = new List <IShape>();

            string input = Console.ReadLine();

            while (input == "Square" || input == "Rectangle" || input == "Circle")
            {
                PopulateFiguresList(figures, input);

                input = Console.ReadLine();
            }

            GraphicEditor shapeVisualisator = new GraphicEditor();

            foreach (var shape in figures)
            {
                shapeVisualisator.DrawShape(shape);
            }
        }
        static void Main()
        {
            var circle = new GraphicEditor();

            circle.DrawShape(new Rectangle());
        }