예제 #1
0
 private void DrawStation(MarkerData s, Rectangle rc)
 {
     if (s.Visible)
     {
         Line l = new Line();
         l.set_X1((double) s.Position);
         l.set_X2((double) s.Position);
         l.set_Y1((double) rc.Y);
         l.set_Y2(this.CanvasRoot_ActualHeight - rc.Y);
         l.set_Width(1251.0);
         l.set_Height(this.CanvasRoot_ActualHeight);
         if (s.Style == PositionMarkerStyle.MarkerStation)
         {
             l.set_StrokeThickness(2.0);
         }
         else if (s.Style == PositionMarkerStyle.MarkerIntermediateStop)
         {
             l.get_StrokeDashArray().Add(2.0);
             l.get_StrokeDashArray().Add(2.0);
             l.set_StrokeThickness(2.0);
         }
         else if (s.Style == PositionMarkerStyle.MarkerSegmentBorder)
         {
             l.set_StrokeThickness(1.0);
         }
         else
         {
             l.set_StrokeThickness(2.0);
         }
         l.set_Stroke(new SolidColorBrush(_SilverlightHelper.ConvertToColor(s.Color)));
         this.LineAdjust1PixelsWidth(l);
         this.CanvasRoot.get_Children().Add(l);
     }
 }
예제 #2
0
 public int MySortFunction(MarkerData obj1, MarkerData obj2)
 {
     return obj1.Position.CompareTo(obj2.Position);
 }