Example #1
0
        private void needLicenseNumber(eGarageOptions i_UserChoice)
        {
            string licenseNumber = IO.GetLicenseNumber();

            if (i_UserChoice == eGarageOptions.InsertVehicleToGarage)
            {
                insertVehicleToGarge(licenseNumber);
            }
            else if (!garage.IsVehicleInGarage(licenseNumber))
            {
                IO.VehicleNotInGarageMsg(licenseNumber);
            }
            else
            {
                switch (i_UserChoice)
                {
                case eGarageOptions.ChangeGarageStateOfVehicle:
                {
                    changeGarageStateOfVehicle(licenseNumber);
                    break;
                }

                case eGarageOptions.AddAirToWheel:
                {
                    garage.FillAirToMax(licenseNumber);
                    break;
                }

                case eGarageOptions.RefulVehicle:
                {
                    refulVehicle(licenseNumber);
                    break;
                }

                case eGarageOptions.ChargeVehicle:
                {
                    chargeVihicle(licenseNumber);
                    break;
                }

                case eGarageOptions.ShowVehicleDetails:
                {
                    IO.PrintMsg(garage.GetClientVehicleDetails(licenseNumber));

                    break;
                }
                }
            }
        }