Example #1
0
        public void ShowMainMenu()
        {
            Console.WriteLine("Main menu:\n" +
                              "Create a new figure - 1\n" +
                              "Load a figure - 2\n" +
                              "Show polygons count - 3\n" +
                              "Show polyhedrons count - 4\n" +
                              "Show figures count - 5\n" +
                              "Quit - q");

            Console.Write("Input: ");
            string input = Console.ReadLine();

            Console.WriteLine();

            switch (input.ToLower())
            {
            case "1":
                Console.Clear();
                CreateFigureMenu();

                break;

            case "2":
                Console.Clear();
                LoadFigureMenu();

                break;

            case "3":
                Console.Clear();
                ConsoleView.ColorizeInfo($"Polygons count : {_interactor.GetPolygonsCount()}");
                Console.WriteLine();

                break;

            case "4":
                Console.Clear();
                ConsoleView.ColorizeInfo($"Polyhedrons count : {_interactor.GetPolyhedronsCount()}");
                Console.WriteLine();

                break;

            case "5":
                Console.Clear();
                ConsoleView.ColorizeInfo(
                    $"Figures count : {_interactor.GetPolygonsCount() + _interactor.GetPolyhedronsCount()}");
                Console.WriteLine();

                break;

            case "q":
                return;
            }

            ShowMainMenu();
        }