예제 #1
0
            protected override DateTime GetEarliestDepartureDateTime(StopsBasic.StopBasic stop)
            {
                foreach (var js in journey.JourneySegments)
                {
                    if (DataFeedDesktop.Basic.Stops.FindByIndex(js.SourceStopID).ParentStation.ID == stop.ParentStation.ID)
                    {
                        return(js.DepartureDateTime);
                    }

                    if (js is TripSegment)
                    {
                        foreach (var @is in (js as TripSegment).IntermediateStops)
                        {
                            if (DataFeedDesktop.Basic.Stops.FindByIndex(@is.StopID).ParentStation.ID == stop.ParentStation.ID)
                            {
                                return(@is.Arrival);
                            }
                        }
                    }

                    if (DataFeedDesktop.Basic.Stops.FindByIndex(js.TargetStopID).ParentStation.ID == stop.ParentStation.ID)
                    {
                        return(js.ArrivalDateTime);
                    }
                }

                throw new ArgumentException("Stop ID not found in the journey.");
            }
예제 #2
0
 public StopPin(StopsBasic.StopBasic stop) => Stop = stop;
예제 #3
0
 protected override DateTime GetEarliestDepartureDateTime(StopsBasic.StopBasic stop) => DateTime.Now;