Esempio n. 1
0
 private static void tryChargeElectricVehicle(Garage i_Garage, string i_LicensePlate)
 {
     if (i_Garage.IsElectricVehicle(i_LicensePlate))
     {
         float chargingTime = getEnergyAmountToAdd(i_Garage.VehiclesInTheGarage[i_LicensePlate].OwnersVehicle);
         i_Garage.FillEnergy(i_LicensePlate, chargingTime);
     }
     else
     {
         Console.WriteLine("Can't Charge Non-Electric Vehicle");
     }
 }
Esempio n. 2
0
 private static void tryFuelTank(Garage i_Garage, string i_LicensePlate)
 {
     if (i_Garage.IsGasVehicle(i_LicensePlate))
     {
         Engine.eFuelType fuelType   = getFuelType(i_Garage.VehiclesInTheGarage[i_LicensePlate].OwnersVehicle);
         float            fuelAmount = getEnergyAmountToAdd(i_Garage.VehiclesInTheGarage[i_LicensePlate].OwnersVehicle);
         i_Garage.FillEnergy(i_LicensePlate, fuelAmount, fuelType);
     }
     else
     {
         Console.WriteLine("Can't Fuel Non-Gas Vehicle");
     }
 }