Exemplo n.º 1
0
        public void                                                            InflateWheels(string i_LicensePlate)
        {
            VehicalInformation vehicalToInflate = FindVehical(i_LicensePlate);

            foreach (Wheel currentWheel in vehicalToInflate.Vehical.Wheels)
            {
                currentWheel.Inflate(currentWheel.MaxPsi - currentWheel.CurrentPsi);
            }
        }
Exemplo n.º 2
0
 public void                                                            RechargeVehical(VehicalInformation i_VehicalToRecharge, float i_HoursToCharge)
 {
     if (i_VehicalToRecharge.Vehical.Engine is ElectricEngine electricVehicalToRecharge)
     {
         electricVehicalToRecharge.chargeVehical(i_HoursToCharge);
     }
     else
     {
         throw new ArgumentException("Cannot recharge a vehical that is not run by electricity!");
     }
 }
Exemplo n.º 3
0
 public void                                                            RefuelVehical(VehicalInformation i_VehicalToRefuel, Enums.eFuelType i_FuelType, float i_GasToFill)
 {
     if (i_VehicalToRefuel.Vehical.Engine is GasEngine gasVehicalToRefuel)
     {
         gasVehicalToRefuel.fillGas(i_FuelType, i_GasToFill);
     }
     else
     {
         throw new ArgumentException("Cannot refuel a vehical that is not run by gas!");
     }
 }
Exemplo n.º 4
0
        public void                                                            ChangeVehicalStatus(string i_LicensePlate, Enums.eVehicalStatus i_NewStatus)
        {
            VehicalInformation VehicalToUpdate = FindVehical(i_LicensePlate);

            VehicalToUpdate.VehicalStatus = i_NewStatus;
        }
Exemplo n.º 5
0
 public void                                                            AddVehical(VehicalInformation i_VehicalToAdd)
 {
     r_Vehicals.Add(i_VehicalToAdd.Vehical.LicensePlate.GetHashCode(), i_VehicalToAdd);
 }