void TelemetryLapManager_PacketProcessed(object sender, PacketEventArgs e) { if (started) { var lastPacket = e.Packet; GraphPane myPane = zedGraphControl1.GraphPane; var curve = myPane.CurveList.First( (a) => a.Label.Text == atual ); IPointListEdit list = curve.Points as IPointListEdit; if (list == null) return; if (deltatype == DeltaType.SpeedDelta) { list.Add(lastPacket.DistanceMapped, TelemetryLapManager.GetSpeedDeltaValue()); } else { list.Add(lastPacket.DistanceMapped, TelemetryLapManager.GetTimeDelta()); } } }
void telemetryLapManager_PacketProcessed(object sender, PacketEventArgs e) { var lastPacket = e.Packet; GraphPane myPane = zedGraphControl1.GraphPane; var curve = myPane.CurveList.First( (a) => a.Label.Text == "RealTime" ); IPointListEdit list = curve.Points as IPointListEdit; if (list == null) return; list.Add(lastPacket.GetFieldValue(Xlabel), lastPacket.GetFieldValue(Ylabel)); }