public void Action(ListFigures activeList)
        {
            Console.WriteLine("Введите параметры линии:");
            Console.Write("Введите длину: ");
            int  lineA = Convert.ToInt32(Console.ReadLine());
            Line line  = new Line(lineA);

            line.CreatedOk();
            Console.WriteLine("Нажмите на любую клавишу что бы продолжить");
            Console.ReadKey();
            activeList.AddToList(line);
        }
Beispiel #2
0
        public void Action(ListFigures activeList)
        {
            Console.WriteLine("Введите параметры фигуры квадрат: ");
            Console.Write("Введите сторону: ");
            int    sqA    = Convert.ToInt32(Console.ReadLine());
            Square square = new Square(sqA);

            square.CreatedOk();
            Console.WriteLine("Нажмите на любую клавишу что бы продолжить");
            Console.ReadKey();
            activeList.AddToList(square);
        }
Beispiel #3
0
        public void Action(ListFigures activeList)
        {
            Console.WriteLine("Введите параметры фигуры прямоугльник: ");
            Console.Write("Введите сторону A: ");
            int reA = Convert.ToInt32(Console.ReadLine());

            Console.Write("Введите сторону B: ");
            int       reB       = Convert.ToInt32(Console.ReadLine());
            Rectangle rectangle = new Rectangle(reA, reB);

            rectangle.CreatedOk();
            Console.WriteLine("Нажмите на любую клавишу что бы продолжить");
            Console.ReadKey();
            activeList.AddToList(rectangle);
        }
Beispiel #4
0
 public void Action(ListFigures activeList)
 {
     if (activeList.GetList().Count() == 0)
     {
         Console.WriteLine("В наличии фигур нет");
     }
     else
     {
         Console.WriteLine("В наличии фигуры:");
         foreach (var item in activeList.GetList())
         {
             Console.WriteLine(item);
         }
     }
 }
Beispiel #5
0
        public void Action(ListFigures activeList)
        {
            Console.WriteLine("Введите параметры фигуры треугольник: ");
            Console.Write("Введите сторону A: ");
            int trA = Convert.ToInt32(Console.ReadLine());

            Console.Write("Введите сторону B: ");
            int trB = Convert.ToInt32(Console.ReadLine());

            Console.Write("Введите сторону C: ");
            int      trC      = Convert.ToInt32(Console.ReadLine());
            Triangle triangle = new Triangle(trA, trB, trC);

            triangle.CreatedOk();
            Console.WriteLine("Нажмите на любую клавишу что бы продолжить");
            Console.ReadKey();
            activeList.AddToList(triangle);
        }
Beispiel #6
0
        public void Action(ListFigures activeList)
        {
            Console.WriteLine("Введите параметры фигуры круг: ");
            Console.WriteLine("Введите координыт центра: ");
            Console.WriteLine("A: ");
            int rA = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("B: ");
            int rB = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Введите радиус: ");
            int   rR    = Convert.ToInt32(Console.ReadLine());
            Round round = new Round(rA, rB, rR);

            round.CreatedOk();
            Console.WriteLine("Нажмите на любую клавишу что бы продолжить");
            Console.ReadKey();
            activeList.AddToList(round);
        }
Beispiel #7
0
        public void Action(ListFigures activeList)
        {
            Console.WriteLine("Введите параметры фигуры окружность: ");
            Console.WriteLine("Введите координыт центра: ");
            Console.WriteLine("A: ");
            int cA = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("B: ");
            int cB = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Введите радиус: ");
            int    cR     = Convert.ToInt32(Console.ReadLine());
            Circle circle = new Circle(cA, cB, cR);

            circle.CreatedOk();
            Console.WriteLine("Нажмите на любую клавишу что бы продолжить");
            Console.ReadKey();
            activeList.AddToList(circle);
        }
        public void Action(ListFigures activeList)
        {
            Console.WriteLine("Введите параметры фигуры кольцо: ");
            Console.WriteLine("Введите координыт центра: ");
            Console.Write("A: ");
            int ringA = Convert.ToInt32(Console.ReadLine());

            Console.Write("B: ");
            int ringB = Convert.ToInt32(Console.ReadLine());

            Console.Write("Введите внутренний радиус: ");
            int ringInR = Convert.ToInt32(Console.ReadLine());

            Console.Write("Введите внешний радиус: ");
            int  ringOutR = Convert.ToInt32(Console.ReadLine());
            Ring ring     = new Ring(ringA, ringB, ringInR, ringOutR);

            ring.CreatedOk();
            Console.WriteLine("Нажмите на любую клавишу что бы продолжить");
            Console.ReadKey();
            activeList.AddToList(ring);
        }