Inheritance: IGraphicEditor
Ejemplo n.º 1
0
        public static void Main()
        {
            GraphicEditor graphicEditor = new GraphicEditor();
            Circle        circle        = new Circle();

            graphicEditor.DrawShape(circle);
        }
Ejemplo n.º 2
0
        static void Main()
        {
            var circle       = new Circle();
            var graficEditor = new GraphicEditor();

            graficEditor.DrawShape(circle);
        }
Ejemplo n.º 3
0
        static void Main()
        {
            IShape        rec    = new Square();
            GraphicEditor editor = new GraphicEditor();

            editor.DrawShape(rec);
        }
Ejemplo n.º 4
0
        static void Main()
        {
            GraphicEditor graphicEditor = new GraphicEditor();

            graphicEditor.DrawShape(new Circle());
            graphicEditor.DrawShape(new Square());
            graphicEditor.DrawShape(new Rectangle());
        }
Ejemplo n.º 5
0
        static void Main()
        {
            IShape shape = new Circle();

            GraphicEditor grEd = new GraphicEditor();

            grEd.DrawShape(shape);
        }
Ejemplo n.º 6
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()));
        }
Ejemplo n.º 7
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());
        }
Ejemplo n.º 8
0
        static void Main()
        {
            IDrawable     rectangle     = new Rectangle();
            IDrawable     circle        = new Circle();
            GraphicEditor graphicEditor = new GraphicEditor();

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

            var editor = new GraphicEditor();

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

            Square square = new Square();

            graphicEditor.DrawShape(square);

            graphicEditor.DrawShape(new Rectangle());
        }
Ejemplo n.º 11
0
        static void Main()
        {
            GraphicEditor graphicEditor = new GraphicEditor();

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

            graphicEditor.DrawShape(shapeS);
        }
Ejemplo n.º 12
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);
        }
Ejemplo n.º 13
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);
        }
Ejemplo n.º 14
0
        public static void Main()
        {
            var circle = new Circle();
            var rec    = new Rectangle();
            var sqr    = new Square();

            var drawer = new GraphicEditor();

            drawer.Draw(circle);
            drawer.Draw(rec);
            drawer.Draw(sqr);
        }
Ejemplo n.º 15
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);
        }
Ejemplo n.º 16
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);
        }
Ejemplo n.º 17
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);
            }
        }
Ejemplo n.º 18
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);
            }
        }
Ejemplo n.º 19
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);
        }
Ejemplo n.º 20
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));
        }
Ejemplo n.º 21
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);
        }
Ejemplo n.º 22
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);
        }
Ejemplo n.º 23
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);
        }
Ejemplo 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);
            }
        }
Ejemplo n.º 25
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);
        }
Ejemplo n.º 26
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);
            }
        }
Ejemplo n.º 27
0
        static void Main()
        {
            var circle = new GraphicEditor();

            circle.DrawShape(new Rectangle());
        }