Inheritance: IGraphicEditor
示例#1
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);
        }
示例#3
0
        static void Main()
        {
            IShape        rec    = new Square();
            GraphicEditor editor = new GraphicEditor();

            editor.DrawShape(rec);
        }
示例#4
0
        static void Main()
        {
            GraphicEditor graphicEditor = new GraphicEditor();

            graphicEditor.DrawShape(new Circle());
            graphicEditor.DrawShape(new Square());
            graphicEditor.DrawShape(new Rectangle());
        }
示例#5
0
        static void Main()
        {
            IShape shape = new Circle();

            GraphicEditor grEd = new GraphicEditor();

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

            graphicEditor.DrawShape(circle);
            graphicEditor.DrawShape(rectangle);
        }
示例#9
0
        static void Main()
        {
            var circle = new Circle();
            var square = new Square();

            var editor = new GraphicEditor();

            editor.DrawShape(circle);
            editor.DrawShape(square);
        }
示例#10
0
        public static void Main()
        {
            GraphicEditor graphicEditor = new GraphicEditor();

            Square square = new Square();

            graphicEditor.DrawShape(square);

            graphicEditor.DrawShape(new Rectangle());
        }
示例#11
0
        static void Main()
        {
            GraphicEditor graphicEditor = new GraphicEditor();

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

            graphicEditor.DrawShape(shapeS);
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }
        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);
            }
        }
示例#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);
            }
        }
示例#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);
        }
示例#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));
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#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);
            }
        }
示例#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);
        }
示例#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);
            }
        }
        static void Main()
        {
            var circle = new GraphicEditor();

            circle.DrawShape(new Rectangle());
        }