Пример #1
0
        public static void ChangeTrapezium()
        {
            int changeTrapezium;

            Console.WriteLine("\nRepeat?");
            Console.WriteLine("1. Yes\n2. No");
            try
            {
                changeTrapezium = int.Parse(Console.ReadLine());
                if (changeTrapezium is 1)
                {
                    Console.Clear();
                    Trapezium();
                }

                else if (changeTrapezium is 2)
                {
                    Console.Clear();
                    SelectENG.ChangeShapeOperationENG();
                }

                else
                {
                    ExeptionFilter.ExeptionOutputENG();
                    ChangeTrapezium();
                }
            }
            catch
            {
                ExeptionFilter.ExeptionOutputENG();
                ChangeTrapezium();
            }
        }
Пример #2
0
        public static void ChangeCheck()
        {
            switch (change)
            {
            case 1:
                Console.Clear();
                SelectRUS.ChangeShapeOperation();
                break;

            case 2:
                Console.Clear();
                SelectENG.ChangeShapeOperationENG();
                break;

            case 9:

                Environment.Exit(0);
                break;

            default:
                ExeptionFilter.ExeptionOutputRUSAndENG();
                ChangeLang();
                break;
            }
        }
Пример #3
0
 public static void CheckSelect2()
 {
     if (Choice == 1)
     {
         Console.Clear();
         CircleAreaENG.CircleAreaShape();
     }
     else if (Choice == 2)
     {
         Console.Clear();
         SquareAreaENG.SquareAreaShape();
     }
     else if (Choice == 3)
     {
         Console.Clear();
         TrapeziumAreaENG.Trapezium();
     }
     else if (Choice == 8)
     {
         Console.Clear();
         SelectENG.ChangeShapeOperationENG();
     }
     else
     {
         ExeptionFilter.ExeptionOutputENG();
         SelectShapes();
     }
 }
Пример #4
0
        public static void InitializingSquare()
        {
            Square square = new Square(A, B);

            square.DrawENG();
            Thread.Sleep(2000);
            SelectENG.NextChangeENG();
        }
Пример #5
0
        public static void CheckGradus()
        {
            Shapes sectoin = new Section(X, Y);

            sectoin.DrawENG();
            Thread.Sleep(2000);
            SelectENG.NextChangeENG();
        }
Пример #6
0
        public static void InitializingCircle()
        {
            Circle circle = new Circle(radiusCircle);

            Console.WriteLine("Area of a circle S = " + circle.FigureArea());
            Thread.Sleep(2000);
            SelectENG.NextChangeENG();
        }
Пример #7
0
        public static void CheckSelect2()
        {
            if (ChangeOp is 1)
            {
                Console.Clear();
                SectionGradusENG.SectionGradusXY();
            }

            else if (ChangeOp is 8)
            {
                Console.Clear();
                SelectENG.ChangeShapeOperationENG();
            }

            else
            {
                ExeptionFilter.ExeptionOutputENG();
                SelectShape();
            }
        }
Пример #8
0
        public static void Trapezium()
        {
            Console.OutputEncoding = Encoding.UTF8;
            try
            {
                Console.WriteLine("Enter the value of points x1, y1: ");
                x1 = int.Parse(Console.ReadLine());
                y1 = int.Parse(Console.ReadLine());
                Console.WriteLine("Enter the value of points x2,y2: ");
                x2 = int.Parse(Console.ReadLine());
                y2 = int.Parse(Console.ReadLine());
                Console.WriteLine("Enter the value of points x3,y3: ");
                x3 = int.Parse(Console.ReadLine());
                y3 = int.Parse(Console.ReadLine());
                Console.WriteLine("Enter the value of points x4,y4: ");
                x4 = int.Parse(Console.ReadLine());
                y4 = int.Parse(Console.ReadLine());

                Trapezium trapezium = new Trapezium(x1, x2, x3, x4, y1, y2, y3, y4);

                if (trapezium.FigureArea() is 0)
                {
                    ExeptionFilter.ExeptionOutputENG();
                    ChangeTrapezium();
                }
                else
                {
                    trapezium.DrawENG();
                    SelectENG.NextChangeENG();
                }
            }
            catch
            {
                ExeptionFilter.ExeptionOutputENG();
                Trapezium();
            }
        }