Esempio n. 1
0
        public static float GetCurrentAirPressure(eTypeOfVehicle i_Type, string i_Input)
        {
            float airPressure = 0;

            switch (i_Type)
            {
            case eTypeOfVehicle.ElectricCar:
                airPressure = Vehicle.CheckValidationOfCurrentPressure(i_Input, (float)32, "wrong pressure");
                break;

            case eTypeOfVehicle.ElectricMotorcycle:
                airPressure = Vehicle.CheckValidationOfCurrentPressure(i_Input, (float)30, "wrong pressure");
                break;

            case eTypeOfVehicle.FuelBasedCar:
                airPressure = Vehicle.CheckValidationOfCurrentPressure(i_Input, (float)32, "wrong pressure");
                break;

            case eTypeOfVehicle.FuelBasedMotorcycle:
                airPressure = Vehicle.CheckValidationOfCurrentPressure(i_Input, (float)30, "wrong pressure");
                break;

            default:
                airPressure = Vehicle.CheckValidationOfCurrentPressure(i_Input, (float)28, "wrong pressure");
                break;
            }

            return(airPressure);
        }