void updateGraph(int val) { if (this.c2DPushGraph1.InvokeRequired) { updateGraphCallback d = new updateGraphCallback(updateGraph); this.Invoke(d, new object[] { val }); } else { c2DPushGraph1.AddLine(42, Color.Red); c2DPushGraph1.Push(val, 42); c2DPushGraph1.UpdateGraph(); } }
void updateGraph(uint val) { if (this.c2DPushGraph1.InvokeRequired) { updateGraphCallback d = new updateGraphCallback(updateGraph); this.Invoke(d, new object[] { val }); } else { val = (uint)(val / 1000000f); c2DPushGraph1.MaxLabel = c2DPushGraph1.MaxPeekMagnitude.ToString(); c2DPushGraph1.AddLine(42, Color.Red); c2DPushGraph1.Push((int)val, 42); c2DPushGraph1.UpdateGraph(); } }