Exemplo n.º 1
0
 private void ScheduleUtmUpdate(PlanPoint p)
 {
     if (p.dt == null)
     {
         p.dt = new DispatcherTimer(OneSecond, DispatcherPriority.Background, UtmUpdate, this.Dispatcher);
         p.dt.Tag = p;
         p.dt.Start();
     }
     else
     {
         p.dt.Stop();
         p.dt.Start();
     }
 }
Exemplo n.º 2
0
        void DrawPlanPoint(DrawingContext dc, PlanPoint pp)
        {
            // AB is the pctg point, XY is the local Coordinates
            FormattedText ft;
            Point tp, p = Pct2CanvasPoint(pp.Pct);

            dc.DrawEllipse(AlignPointBrush, null, p, markerRadius, markerRadius);

            ft = new FormattedText($"{pp.PointName}", Thread.CurrentThread.CurrentUICulture,
                FlowDirection.LeftToRight, Typeface, NpEmSize, Foreground);
            tp = new Point(p.X - (ft.Width / 2), p.Y + (markerRadius / 2) + 1);
            dc.DrawText(ft, tp);
        }