コード例 #1
0
ファイル: Garage.cs プロジェクト: Roy-44/Garage-Manager
        public void FillEnergy(string i_LicensePlate, float i_EnergyAmount, Engine.eFuelType?i_FuelType = null)
        {
            if (Vehicle.CheckLicensePlate(i_LicensePlate) == false)
            {
                throw new FormatException("Invalid license plate");
            }

            VehiclesInTheGarage[i_LicensePlate].OwnersVehicle.FillEnergy(i_EnergyAmount, i_FuelType);
        }
コード例 #2
0
ファイル: Garage.cs プロジェクト: Roy-44/Garage-Manager
        public void InflateTires(string i_LicensePlate)
        {
            if (Vehicle.CheckLicensePlate(i_LicensePlate) == false)
            {
                throw new FormatException("Invalid license plate");
            }

            VehiclesInTheGarage[i_LicensePlate].OwnersVehicle.InflateTires();
        }
コード例 #3
0
ファイル: Garage.cs プロジェクト: Roy-44/Garage-Manager
        public void ChangeVehicleStatus(string i_LicensePlate, Garage.eVehicleStatus i_VehicleNewStatus)
        {
            if (Vehicle.CheckLicensePlate(i_LicensePlate) == false)
            {
                throw new FormatException("Invalid license plate");
            }

            m_VehiclesInTheGarage[i_LicensePlate].VehicleStatus = i_VehicleNewStatus;
        }
コード例 #4
0
ファイル: Garage.cs プロジェクト: Roy-44/Garage-Manager
        public bool IsVehicleInGarage(string i_LicensePlate)
        {
            if (Vehicle.CheckLicensePlate(i_LicensePlate) == false)
            {
                throw new FormatException("Invalid license plate");
            }

            return(m_VehiclesInTheGarage.ContainsKey(i_LicensePlate));
        }
コード例 #5
0
ファイル: Garage.cs プロジェクト: Roy-44/Garage-Manager
        public string GetVehicleDetailsString(string i_LicensePlate)
        {
            if (Vehicle.CheckLicensePlate(i_LicensePlate) == false)
            {
                throw new FormatException("Invalid license plate");
            }

            return(VehiclesInTheGarage[i_LicensePlate].ToString());
        }