public VehicleInGarage(Vehicle i_Vehicle, string i_OwnerName, string i_OwnerCellNumber) { r_Vehicle = i_Vehicle; r_OwnerName = i_OwnerName; r_OwnerCellNumber = i_OwnerCellNumber; m_VehicleStatus = Garage.eVehicleStatus.Repairing; }
public VehicleInfo(Vehicle i_Vehicle, string i_OwnerName, string i_OwnerPhoneNumber) { m_Vehicle = i_Vehicle; m_OwnerName = i_OwnerName; m_OwnerPhoneNumber = i_OwnerPhoneNumber; m_VehicleStatus = eVehicleStatus.InRepair; }
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; }
private void ChangeVehicleStatusRoutine() { string licenseNumber = GetLicenseNumber(); Garage.eVehicleStatus newStatus = GetStatus(); m_Garage.ChangeVehicleStatus(licenseNumber, newStatus); Console.WriteLine(k_VehicleStatusChangedMassage); }
private static void showLicensePlates(Garage i_Garage) { bool toFilter = getIfFilterNeeded(); if (toFilter == false) { printLicensePlates(i_Garage); } else { Garage.eVehicleStatus vehicleStatusFilter = getVehicleStatus(); printLicensePlates(i_Garage, vehicleStatusFilter); } }
public static void Run() { Garage myGarage = new Garage(); Console.WriteLine(string.Format("Welcome To The Garage!")); Garage.eGarageOptions?clientChoosement = null; string licensePlate = null; const bool k_GarageExist = true; do { Console.WriteLine(); printActionOptionsToClient(); clientChoosement = getClientChoosement(); if (clientChoosement != Garage.eGarageOptions.ShowLicensePlates) { licensePlate = GetLicensePlate(); if (clientChoosement != Garage.eGarageOptions.EnterVehicle) { if (myGarage.IsVehicleInGarage(licensePlate) == false) { Console.WriteLine("This Vehicle Is Not In The Garage."); continue; } } } switch (clientChoosement) { case Garage.eGarageOptions.EnterVehicle: { tryEnterVehicleToTheGarage(myGarage, licensePlate); break; } case Garage.eGarageOptions.ShowLicensePlates: { showLicensePlates(myGarage); break; } case Garage.eGarageOptions.ChangeVehicleStatus: { Garage.eVehicleStatus vehicleStatus = getVehicleStatus(); myGarage.ChangeVehicleStatus(licensePlate, vehicleStatus); break; } case Garage.eGarageOptions.InflateTires: { myGarage.InflateTires(licensePlate); break; } case Garage.eGarageOptions.FuelTank: { tryFuelTank(myGarage, licensePlate); break; } case Garage.eGarageOptions.ChargeElectricVehicle: { tryChargeElectricVehicle(myGarage, licensePlate); break; } case Garage.eGarageOptions.ShowVehicleDetails: { Console.WriteLine(myGarage.GetVehicleDetailsString(licensePlate)); break; } default: { break; } } }while (k_GarageExist); }
public HoldAddGarageVehicleParams(string i_Name, string i_Phone, string i_Model, string i_Plate, HoldWheelParams i_Wheel, HoldEngineParams i_Engine, Garage.eVehicleStatus i_Status, eVehicleTypes i_Type) { r_ClientName = i_Name; r_PhoneNumber = i_Phone; r_VehicleType = i_Type; r_VehicleModel = i_Model; r_LicencePlate = i_Plate; r_Wheels = i_Wheel; r_Engine = i_Engine; }
public void UpdateVehicleStatus(string i_LicensePlate, string i_NewStatus) { Garage.eVehicleStatus statusToUpdate = LogicUtils.EnumValidation <Garage.eVehicleStatus>(i_NewStatus, k_VehicleStatusKey); this.checkLicensePlate(i_LicensePlate); this.m_Vehicle[i_LicensePlate].Status = statusToUpdate; }