Esempio n. 1
0
        public void AddEnergyToVehicle(string i_LicenseNumber, float i_AmountOfEnergyToAdd, Motor.eFuelType i_FuelType = 0)
        {
            Vehicle desiredVehicle = getVehicleByLicenseNumber(i_LicenseNumber);

            if (desiredVehicle.Equals(null))
            {
                throw new KeyNotFoundException(k_VehicleNotFoundMessage);
            }

            desiredVehicle.AddEnergyToMotor(i_AmountOfEnergyToAdd, i_FuelType);
        }
Esempio n. 2
0
        public void ChangeVehicleStatus(string i_LicenseNumber, Customer.eVehicleStatusInTheGarage i_NewVehicleStatus)
        {
            Vehicle desiredVehicle = getVehicleByLicenseNumber(i_LicenseNumber);

            if (desiredVehicle.Equals(null))
            {
                throw new KeyNotFoundException(k_VehicleNotFoundMessage);
            }

            r_GarageDataBase[desiredVehicle].VehicleStatusInTheGarage = i_NewVehicleStatus;
        }
Esempio n. 3
0
        public void InflateAllVehicleWheelsToMax(string i_LicenseNumber)
        {
            Vehicle desiredVehicle = getVehicleByLicenseNumber(i_LicenseNumber);

            if (desiredVehicle.Equals(null))
            {
                throw new KeyNotFoundException(k_VehicleNotFoundMessage);
            }

            desiredVehicle.InflateAllWheelsToMaxAirPressure();
        }
Esempio n. 4
0
        public string ShowVehicleFullData(string i_LicenseNumber)
        {
            Vehicle desiredVehicle = getVehicleByLicenseNumber(i_LicenseNumber);

            if (desiredVehicle.Equals(null))
            {
                throw new KeyNotFoundException(k_VehicleNotFoundMessage);
            }

            StringBuilder vehicleDataBuilder = new StringBuilder();

            vehicleDataBuilder.AppendFormat("{0}{1}", Environment.NewLine, desiredVehicle.ToString());


            return(vehicleDataBuilder.ToString());
        }