Beispiel #1
0
 private void canvas_RouteMouseHover(object sender, Canvas.RouteMouseHoverEventArgs e)
 {
     HandleMouseHover(e.ParameterizedLocation, e.IsClose && e.ParameterizedLocation != null);
       if (e.IsClose)
       {
     double xValue = 0;
     switch (lineGraph.Graph.XAxisAttribute)
     {
       case DomainAttribute.TimeOfDay:
     xValue = (double)canvas.CurrentSession.Route.GetTimeFromParameterizedLocation(e.ParameterizedLocation).ToLocalTime().Ticks / TimeSpan.TicksPerSecond;
     break;
       case DomainAttribute.ElapsedTime:
     xValue = (double)(canvas.CurrentSession.Route.GetTimeFromParameterizedLocation(e.ParameterizedLocation).Ticks - canvas.CurrentSession.Route.FirstWaypoint.Time.Ticks) / TimeSpan.TicksPerSecond;
     break;
       case DomainAttribute.Distance:
     xValue = canvas.CurrentSession.Route.GetAttributeFromParameterizedLocation(WaypointAttribute.Distance, e.ParameterizedLocation).Value;
     break;
     }
     lineGraph.HoverXValue = xValue;
       }
       else
       {
     lineGraph.HoverXValue = null;
       }
 }
Beispiel #2
0
 private void lineGraph_GraphMouseHover(object sender, Canvas.RouteMouseHoverEventArgs e)
 {
     // draw/erase marker on canvas
       canvas.DrawActiveHandle(e.ParameterizedLocation);
       HandleMouseHover(e.ParameterizedLocation, e.IsClose && e.ParameterizedLocation != null);
 }
Beispiel #3
0
 private void canvas_ActionPerformed(object sender, Canvas.ActionEventArgs e)
 {
     HandleAction(e.Action);
 }
Beispiel #4
0
 private void lineGraph_GraphMouseDown(object sender, Canvas.RouteMouseHoverEventArgs e)
 {
     if (e.ParameterizedLocation != null)
       {
     switch (canvas.CurrentMouseTool)
     {
       case Canvas.MouseTool.Lap:
     bool showLapTimeForm = ((ModifierKeys & Keys.Shift) == Keys.Shift);
     canvas.AddLap(e.ParameterizedLocation, showLapTimeForm);
     break;
       case Canvas.MouseTool.Cut:
     canvas.Cut(e.ParameterizedLocation);
     break;
     }
       }
 }