/// <summary> /// Addes a station the the waiting list. /// </summary> /// <param name="station"> Instatnce of the IStationModel entering the waiting list.</param> public void AddStation(IStationModel station) { WaitingStationsList.Add(station); if (Flight == null) { CallNextFlight(); } }
/// <summary> /// Constructor. /// </summary> /// <param name="flight">The FlightModel instance that moving.</param> /// <param name="stationId">The ID of the station the flight move to.</param> /// <param name="oldStation">The StationModel instatnce the flight moved from.</param> public FlightMoveArgs(FlightModel flight, int?stationId, IStationModel oldStation = null) { Flight = flight; StationId = stationId; OldStation = oldStation; }
public TrainDetailInfoModel(string trainText) { var texts = trainText.Split('|'); train_no = texts[3]; start_station = new StationModel() { code = texts[6] }.Select <StationModel>()[0]; end_station = new StationModel() { code = texts[7] }.Select <StationModel>()[0]; train_start_station = new StationModel() { code = texts[4] }.Select <StationModel>()[0]; train_end_station = new StationModel() { code = texts[5] }.Select <StationModel>()[0]; // 26 29 time = TimeSpan.Parse(texts[10]); run_time = new TrainRunTimeModel() { start_time = new TimeInterpreter(texts[8]), end_time = new TimeInterpreter(texts[9]) }; //min = Convert.ToInt32(texts[1]); //wz = Convert.ToInt32(texts[1]); yz = IsTicketCount(texts[29]); //rz = Convert.ToInt32(texts[1]); rw = IsTicketCount(texts[23]); //gjrw = Convert.ToInt32(texts[1]); //d2 = Convert.ToInt32(texts[1]); //d1 = Convert.ToInt32(texts[1]); //dw = Convert.ToInt32(texts[1]); yw = IsTicketCount(texts[28]); //td = Convert.ToInt32(texts[1]); }
public TrainStationModel(IStationModel start, IStationModel end) { start_station = start; over_station = end; }
/// <summary> /// Invoking the FlightEvent. /// </summary> /// <param name="oldStation">IStationModel instance to be passed to the handler subscribers.</param> private void OnFlightEnteredEvent(IStationModel oldStation) { FlightMoveArgs args = new FlightMoveArgs(Flight, Id, oldStation); _flightEvent?.Invoke(args); }