Пример #1
0
        /// <summary>
        /// This method is for the main menu.
        /// </summary>
        public static void MainMenu()
        {
            Console.Clear();
            int fillPercent = ParkingHouse.FillDegree();

            Console.WriteLine($"The current fill degree is: { fillPercent } % ");
            MenuPrinter();
            Console.WriteLine("Welcome to Prague Parking. Please type the number of your menu choice" +
                              "\n1. Park vehicle " +
                              "  2. Check out vehicle" +
                              "  3. Search for and move vehicle" +
                              "  4. Settings and help" +
                              "  5. Close the application" +
                              "\n");
            Console.Write("Number: ");
            string menuChoice = Console.ReadLine();

            int.TryParse(menuChoice, out int choice);

            if (choice >= 1 && choice <= 5)
            {
                switch (choice)
                {
                case 1: Parkmenu.ParkMenu(); break;

                case 2: Checkout.CheckOut(); break;

                case 3: Movevehicle.MoveVehicle(); break;

                case 4: Settingsmenu.SettingsMenu(); break;

                case 5: CloseApplication(); break;

                default:
                    break;
                }
            }
            else
            {
                Console.Clear();
                Console.WriteLine("Invalid input, try again");
                MainMenu();
            }
        }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     mySettingsmenu = Optionsmenu.GetComponent <Settingsmenu>();
 }