示例#1
0
 public VehiclesInGarage(Vehicle i_Vheicle, string i_OwnersName, string i_OwnersTelephone)
 {
     m_Vehicle         = i_Vheicle;
     m_OwnersName      = i_OwnersName;
     m_OwnersTelephone = i_OwnersTelephone;
     m_State           = eStateInGarage.RepairInProgress;
 }
示例#2
0
 public GarageClient(string i_OwnerName, string i_OwnerPhoneNumber, Vehicle i_vehicle)
 {
     r_OwnerName        = i_OwnerName;
     r_OwnerPhoneNumber = i_OwnerPhoneNumber;
     r_Vehicle          = i_vehicle;
     m_StateInGarage    = eStateInGarage.InAmendment;
 }
示例#3
0
        public List <string> GetLicenseNumbersOfVehicles(string i_StateInGarage)
        {
            bool           getAllLicense;
            List <string>  licenseNumbers     = new List <string>();
            eStateInGarage garageStateToCheck = (eStateInGarage)Enum.Parse(typeof(eStateInGarage), i_StateInGarage);

            getAllLicense = !Enum.IsDefined(typeof(eStateInGarage), garageStateToCheck);

            foreach (KeyValuePair <string, GarageClient> item in m_Vehicls)
            {
                if (item.Value.StateInGarage == garageStateToCheck || getAllLicense)
                {
                    licenseNumbers.Add(item.Key);
                }
            }

            return(licenseNumbers);
        }
示例#4
0
        public void ChangeStateOfVehicle(string i_LicenseNumber, string i_NewState)
        {
            eStateInGarage garageState = ParseUtils.EnumParse <eStateInGarage>(i_NewState, " it is not a state in the Garage");

            m_Vehicls[i_LicenseNumber].StateInGarage = garageState;
        }