public void AddParkingSpot(ParkingSpotType type, string identifier) { if (type == ParkingSpotType.Car) { var spot = new ParkingSpot(ParkingSpotType.Car, identifier); spot.Floor = this; _carSpots.Add(identifier, spot); _availableCarSpots.Add(identifier, spot); } else if (type == ParkingSpotType.Large) { var spot = new ParkingSpot(ParkingSpotType.Large, identifier); spot.Floor = this; _LargeSpots.Add(identifier, spot); _availableLargeSpots.Add(identifier, spot); } else if (type == ParkingSpotType.MotorBike) { var spot = new ParkingSpot(ParkingSpotType.MotorBike, identifier); spot.Floor = this; _motorBikeSpots.Add(identifier, spot); _availableMotorBikeSpots.Add(identifier, spot); } else if (type == ParkingSpotType.HandiCapped) { var spot = new ParkingSpot(ParkingSpotType.HandiCapped, identifier); spot.Floor = this; _handicappedSpots.Add(identifier, spot); _availableHandicappedSpots.Add(identifier, spot); } }
internal DBEntryAirbaseParkingSpot(INIFile ini, string section, string parkingKey) { DCSID = ini.GetValue <int>(section, $"{parkingKey}.DCSID"); Coordinates = ini.GetValue <Coordinates>(section, $"{parkingKey}.Coordinates"); ParkingType = ini.GetValue <ParkingSpotType>(section, $"{parkingKey}.Type"); }
internal bool Park(int terminalId, string vehicleLicenseNumber, ParkingSpotType requiredParkingSpotType, IParkingAssignmentStrategy parkingAssignmentStrategy) { var terminal = GetTerminal(terminalId); var parkingspot = parkingAssignmentStrategy.GetParkingSpot(terminal); parkingspot.Park(vehicleLicenseNumber); return(true); }
/// <summary> /// Constructor. /// </summary> /// <param name="ini">The .ini file to load parking spot data from.</param> /// <param name="parkingKey">The top-level key (parking spot unique ID)</param> /// <param name="isRunway">Is this parking spot a runway spawn spot</param> public DBEntryTheaterAirbaseParkingSpot(INIFile ini, string parkingKey, bool isRunway) { DCSID = ini.GetValue <int>("Airbases", $"{parkingKey}.DCSID"); Coordinates = ini.GetValue <Coordinates>("Airbases", $"{parkingKey}.Coordinates"); ParkingType = ini.GetValue <ParkingSpotType>("Airbases", $"{parkingKey}.Type"); if (isRunway) { ParkingType = ParkingSpotType.Runway; } else if (ParkingType == ParkingSpotType.Runway) { ParkingType = ParkingSpotType.OpenAirSpawn; // Non-runways spots can't be of Runway type } }
public HandicappedParkingSpot() { IsAvailable = true; ParkingSpotType = ParkingSpotType.HANDICAPPED; }
ParkingSpot(ParkingSpotType type) { this.type=type; }
public ParkingSpot(ParkingSpotType type, string identifier) { Type = type; Identifier = identifier; }
public MotorCycleSpot() { IsAvailable = true; ParkingSpotType = ParkingSpotType.MOTORCYCLE; }
public LargeParkingSpot() { IsAvailable = true; ParkingSpotType = ParkingSpotType.LARGE; }
public CompatParkingspot() { IsAvailable = true; ParkingSpotType = ParkingSpotType.COMPACT; }