Пример #1
0
        public void AddRouteInfo(int routeSeq, int stopSeq, int stopID)
        {
            // Add or find sequence
            if (!RouteSequences.ContainsKey(routeSeq))
            {
                RouteSequences[routeSeq] = new RouteSequence(routeSeq);
            }
            RouteSequence sequence = RouteSequences[routeSeq];

            sequence.AddSequencePairing(stopSeq, stopID);
        }
        private List <XmlBusRoute> ObtainAllBusRoutesPassingBusStop(BusStop stop)
        {
            List <XmlBusRoute> listPassing = new List <XmlBusRoute>();

            foreach (XmlBusRoute route in RouteStopExtractor.LoadedBusRoutes)
            {
                RouteSequence sequence = route.GetRouteSequence();
                if (sequence.SequencePairing.Values.Contains(int.Parse(stop.StopID)))
                {
                    listPassing.Add(route);
                }
            }

            return(listPassing);
        }