예제 #1
0
        static void Main(string[] args)
        {
            GraphicEditor graphicEditor = new GraphicEditor();

            graphicEditor.Add(new Line(4, 4));
            graphicEditor.Add(new Circle(5, 2, 2));
            graphicEditor.Add(new Triangle(4, 8, 30));
            graphicEditor.Add(new Rectangle(10, 20));
            graphicEditor.PrintAllInfo();
            Console.WriteLine("Площадь всех объектов: " + graphicEditor.CalcAllSquare());
            Console.WriteLine("\nНапример, переместим прямоугольник и удалим треугольник.\n +Переместим начало прямой");
            graphicEditor.MoveToPrimitive(3, 5, 6);
            graphicEditor.MoveToPrimitive(0, 1, 1);
            graphicEditor.Del(2);
            graphicEditor.PrintAllInfo();
            Console.WriteLine("Площадь всех объектов: " + graphicEditor.CalcAllSquare());
            Console.ReadKey();
        }