public static void NextChangeENG() { Console.WriteLine("\n1. Main menu.\n9. Exiting the program."); try { int next; next = int.Parse(Console.ReadLine()); if (next is 1) { Console.Clear(); SelectENG.ChangeShapeOperationENG(); } else if (next is 9) { Environment.Exit(0); } else { ExeptionFilter.ExeptionOutputENG(); NextChangeENG(); } } catch { ExeptionFilter.ExeptionOutputENG(); NextChangeENG(); } }
public static void CheckChangeENG() { if (Change is 1) { Console.Clear(); SelectShapeAreaENG.SelectShapes(); //ENG } else if (Change is 2) { Console.Clear(); SelectShapeGradusENG.SelectShape();//ENG } else if (Change == 9) { Environment.Exit(0); } else if (Change == 8) { Console.Clear(); SelectLanguage.ChangeLang(); } else { ExeptionFilter.ExeptionOutputENG(); ChangeShapeOperationENG(); } }
public static void ChangeTrapezium() { int changeTrapezium; Console.WriteLine("\nПовторить?"); Console.WriteLine("1. Да\n2. Нет"); try { changeTrapezium = int.Parse(Console.ReadLine()); if (changeTrapezium is 1) { Console.Clear(); Trapezium(); } else if (changeTrapezium is 2) { Console.Clear(); SelectRUS.ChangeShapeOperation(); } else { ExeptionFilter.ExeptionOutput(); ChangeTrapezium(); } } catch { ExeptionFilter.ExeptionOutput(); ChangeTrapezium(); } }
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(); } }
public static void NextChange() { try { int next; Console.WriteLine("\n1. Главное меню.\n9. Выход из программы."); next = int.Parse(Console.ReadLine()); if (next is 1) { Console.Clear(); SelectRUS.ChangeShapeOperation(); } else if (next is 9) { Environment.Exit(0); } else { ExeptionFilter.ExeptionOutput(); NextChange(); } } catch { ExeptionFilter.ExeptionOutput(); NextChange(); } }
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(); } }
public static void CheckChange() { if (Change is 1) { Console.Clear(); SelectShapesArea.SelectShapes(); } else if (Change is 2) { Console.Clear(); SelectShapeGradus.SelectShape(); } else if (Change == 9) { return; } else if (Change == 8) { Console.Clear(); SelectLanguage.ChangeLang(); } else { ExeptionFilter.ExeptionOutput(); ChangeShapeOperation(); } }
public static void CircleAreaShape() { try { Console.Write("Enter the radius of the circle: "); radiusCircle = double.Parse(Console.ReadLine()); InitializingCircle(); } catch { ExeptionFilter.ExeptionOutputENG(); CircleAreaShape(); } }
public static void SectionGradusXY() { try { Console.Write("Enter X coordinates: "); X = int.Parse(Console.ReadLine()); Console.Write("Enter Y coordinates: "); Y = int.Parse(Console.ReadLine()); CheckGradus(); } catch { ExeptionFilter.ExeptionOutputENG(); } }
public static void CircleAreaShape() { Console.Write("Введите радиус круга: "); try { radiusCircle = int.Parse(Console.ReadLine()); Circle circle = new Circle(radiusCircle); Console.WriteLine($"Площадь круга S = {circle.FigureArea()}"); Thread.Sleep(2000); SelectRUS.NextChange(); } catch { ExeptionFilter.ExeptionOutput(); CircleAreaShape(); } }
public static void SquareAreaShape() { try { Console.Write("Enter side A: "); A = double.Parse(Console.ReadLine()); Console.Write("Enter side B: "); B = double.Parse(Console.ReadLine()); Console.WriteLine(); InitializingSquare(); } catch { ExeptionFilter.ExeptionOutputENG(); SquareAreaShape(); } }
public static void SquareAreaShape() { try { Console.Write("Введите сторону а: "); bool isA = double.TryParse(Console.ReadLine(), out A); Console.Write("Введите сторону b: "); bool isB = double.TryParse(Console.ReadLine(), out B); Console.WriteLine(); InitializingSquare(); } catch { ExeptionFilter.ExeptionOutput(); SquareAreaShape(); } }
public static void SelectShape() { Console.WriteLine("Select a shape:"); Console.WriteLine("1.Segment along the axes 'X, Y'"); Console.WriteLine("\n8. Back."); try { ChangeOp = int.Parse(Console.ReadLine()); CheckSelect2(); } catch { ExeptionFilter.ExeptionOutputENG(); SelectShape(); } }
public static void SelectShapes() { Console.WriteLine("Select a shape."); Console.WriteLine("1. Circle"); Console.WriteLine("2. Square"); Console.WriteLine("3. Trapezium"); Console.WriteLine("\n8. Back."); try { Choice = int.Parse(Console.ReadLine()); CheckSelect2(); } catch { ExeptionFilter.ExeptionOutputENG(); SelectShapes(); } }
public static void ChangeShapeOperation() { Console.WriteLine("Выберете вычисление."); Console.WriteLine("1. Вычисление площи фигуры."); Console.WriteLine("2. Вычисление градуса фигуры"); Console.WriteLine("\n8. Поменять язык / Select language"); Console.WriteLine("\n9. Выйти из программы."); Console.Write("\n\nВыбор: "); try { Change = int.Parse(Console.ReadLine()); CheckChange(); } catch { ExeptionFilter.ExeptionOutput(); ChangeShapeOperation(); } }
public static void ChangeShapeOperationENG() { Console.WriteLine("Select calculation."); Console.WriteLine("1. Calculating the area of a figure."); Console.WriteLine("2. Calculating the degree of a figure"); Console.WriteLine("\n8. Select language / Поменять язык"); Console.WriteLine("\n9. Exit the program."); Console.Write("\n\nChoice: "); try { Change = int.Parse(Console.ReadLine()); CheckChangeENG(); } catch { ExeptionFilter.ExeptionOutputENG(); ChangeShapeOperationENG(); } }
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(); } }
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(); } }
public static void Trapezium() { Console.OutputEncoding = Encoding.UTF8; try { Console.WriteLine("Введите значение точек x1, y1: "); x1 = int.Parse(Console.ReadLine()); y1 = int.Parse(Console.ReadLine()); Console.WriteLine("Введите значение точек x2,y2: "); x2 = int.Parse(Console.ReadLine()); y2 = int.Parse(Console.ReadLine()); Console.WriteLine("Введите значение точек x3,y3: "); x3 = int.Parse(Console.ReadLine()); y3 = int.Parse(Console.ReadLine()); Console.WriteLine("Введите значение точек 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.Draw(); SelectRUS.NextChange(); } } catch { ExeptionFilter.ExeptionOutputENG(); Trapezium(); } }