Exemple #1
0
        //Draw a trace and return the trace
        public List <Line> OneStopTrace(string start)
        {
            List <Point> tempList = new List <Point>();
            int          index    = Route.Count + 1;

            for (int i = 0; i < Route.Count; i++)
            {
                if (i > index)
                {
                    tempList.Add(Route.ElementAt <RoadPoint>(i).Coordinate);
                }
                if (Route.ElementAt <RoadPoint>(i) is RoadStop)
                {
                    if (i > index)
                    {
                        break;
                    }
                    RoadStop rs = (RoadStop)Route.ElementAt <RoadPoint>(i);
                    if (rs.StopName.Equals(start))
                    {
                        index = i;
                        tempList.Add(rs.Coordinate);
                    }
                }
            }
            return(LineDrawing.DrawLine(tempList.ToArray(), this.Parent, this.BusColor));
        }
Exemple #2
0
        //Draw Bus Line
        private void DrawBusLineTrace()
        {
            List <Point> tempList = new List <Point>();

            foreach (RoadPoint rp in Route)
            {
                tempList.Add(rp.Coordinate);
            }
            tempTrace = LineDrawing.DrawLine(tempList.ToArray(), this.Parent, this.BusColor);
        }