示例#1
0
        public static void NextStepMainMenu(Garage i_Garage)
        {
            UserConsole  outputUser   = new UserConsole();
            GarageAction garageAction = new GarageAction(i_Garage);
            int          userChoise;

            UserConsole.MainMenu();
            while (true)
            {
                try
                {
                    userChoise = InputValidation.GetInt(string.Empty, 1, 5);
                    break;
                }
                catch (Exception ex)
                {
                    UserConsole.Print(ex.Message);
                }
            }

            UserConsole.SleepAndClear();
            switch (userChoise)
            {
            case 1:
                garageAction.AddVehicleToGarage();
                break;

            case 2:
                garageAction.ShowAllVehicles();
                break;

            case 3:
                garageAction.ShowVehiclesWithFilter();
                break;

            case 4:
                NextStepVehicleMenu(i_Garage, null);
                break;

            case 5:
                System.Environment.Exit(0);
                break;
            }
        }