/// <summary> /// Loads delay info to the info board by train. /// </summary> /// <param name="train"></param> public void LoadInfoBoardByTrain(TrainViewModel train) { DoAndHandleExceptions(() => { InfoBoard_ByTrain.LoadBoard(pageReader.GetTrainDelayInfos(train.GetCopyOfTrain)); }); IsInfoBoardByTrainOn = true; IsStationBoardOn = IsInfoBoardByStationOn = false; }
public DelayInfoViewModel(TBy byData, StationViewModel station, TrainViewModel train, DateTime date, string from, string destination, TimeSpan?plannedArrival, TimeSpan?arrivalDelay, TimeSpan?plannedDeparture, TimeSpan?departureDelay) { Station = station; Train = train; delayInfo = new DelayInfo <TBy>() { ByData = byData, Station = new Station(station.StationName, station.StationID), Train = new Train(train.Name, train.ID, train.Host), Date = date, From = from, Destination = destination, PlannedArrival = plannedArrival, ArrivalDelay = arrivalDelay, PlannedDeparture = plannedDeparture, DepartureDelay = departureDelay }; }