Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
        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");
        }
Exemplo n.º 3
0
    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;
 }
Exemplo n.º 6
0
		ParkingSpot(ParkingSpotType type) {
			this.type=type;
		}
Exemplo n.º 7
0
 public ParkingSpot(ParkingSpotType type, string identifier)
 {
     Type       = type;
     Identifier = identifier;
 }
Exemplo n.º 8
0
 public MotorCycleSpot()
 {
     IsAvailable     = true;
     ParkingSpotType = ParkingSpotType.MOTORCYCLE;
 }
Exemplo n.º 9
0
 public LargeParkingSpot()
 {
     IsAvailable     = true;
     ParkingSpotType = ParkingSpotType.LARGE;
 }
Exemplo n.º 10
0
 public CompatParkingspot()
 {
     IsAvailable     = true;
     ParkingSpotType = ParkingSpotType.COMPACT;
 }