Example #1
0
        private void fillGasVehicle()
        {
            string vehicleLicensePlate = m_UI.GetVehicleLicensePlate();

            Gasoline.eGasType eVehicleGasTypeToFill = m_UI.GetGasTypeToFill();
            float             amountToAdd           = m_UI.GetEnergyAmountToAdd();

            m_Data.FillGas(vehicleLicensePlate, eVehicleGasTypeToFill, amountToAdd);
            m_UI.PrintMsg("\nFill Gas Successfully \n");
        }
Example #2
0
 internal void RefillGas(float i_ToAdd, Gasoline.eGasType i_GasType)
 {
     if (i_GasType.Equals(r_GasType))
     {
         RefillEnergy(i_ToAdd);
     }
     else
     {
         throw (new ArgumentException("Wrong Gas Type"));
     }
 }
Example #3
0
 internal void RefillGas(float i_ToAdd, Gasoline.eGasType i_GasType)
 {
     if (m_Engine is Gasoline)
     {
         Gasoline gasolineEngine = m_Engine as Gasoline;
         gasolineEngine.RefillGas(i_ToAdd, i_GasType);
     }
     else
     {
         throw (new ArgumentException("Wrong Type Of Vehicle"));
     }
 }
Example #4
0
        public void FillGas(string i_VehicleLicensePlate, Gasoline.eGasType i_GasType, float i_ToAdd)
        {
            VehicleInfo currVehicleInfo = FindVehicle(i_VehicleLicensePlate);

            currVehicleInfo.Vehicle.RefillGas(i_ToAdd, i_GasType);
        }