Ejemplo n.º 1
0
        public void BlowingWheelsToTheMaximum()
        {
            string licenseNumber = GarageUI.GetLicenseNumber();
            bool   isSucceed     = garage.BlowingWheelsToTheMaximum(licenseNumber);

            if (!isSucceed)
            {
                GarageUI.NotHaveVehicleInGarage();
            }
            else
            {
                GarageUI.MesegeSucceeded();
            }
            GarageUI.MesegeToContinue();
        }
Ejemplo n.º 2
0
        public void ChangeStatus()
        {
            string licenseNumber = GarageUI.GetLicenseNumber();

            if (licenseNumber != null)
            {
                Utils.VehicleStatus status = GarageUI.GetStatus();
                garage.ChangeStatus(licenseNumber, status);
                GarageUI.MesegeSucceeded();
            }
            else
            {
                GarageUI.NotHaveVehicleInGarage();
            }
            GarageUI.MesegeToContinue();
        }
Ejemplo n.º 3
0
        public void VehicleLoading()
        {
            string licenseNumber = GarageUI.GetLicenseNumber();

            if (licenseNumber != null)
            {
                float addCharging = GarageUI.GetAmountElectric();

                try
                {
                    garage.VehicleLoading(licenseNumber, addCharging);
                    GarageUI.MesegeSucceeded();
                }
                catch (ValueOutOfRangeException)
                {
                    GarageUI.MesegeError();
                }
            }
            else
            {
                GarageUI.NotHaveVehicleInGarage();
            }
            GarageUI.MesegeToContinue();
        }
Ejemplo n.º 4
0
        public void FuelingVehicle()
        {
            string licenseNumber = GarageUI.GetLicenseNumber();

            if (licenseNumber != null)
            {
                Utils.FuelTypes typeFuel = GarageUI.GetTypeFuel();
                float           addFuel  = GarageUI.GetAmountFuel();
                try
                {
                    garage.FuelingVehicle(licenseNumber, typeFuel, addFuel);
                    GarageUI.MesegeSucceeded();
                }
                catch (ValueOutOfRangeException)
                {
                    GarageUI.MesegeError();
                }
            }
            else
            {
                GarageUI.NotHaveVehicleInGarage();
            }
            GarageUI.MesegeToContinue();
        }