private void Form2_AnalogTracePointArrived(object sender, AnalogTracePointEventArgs e) { Invoke(new Action( () => { textBox8.Text = e.TracePoint.Value.ToString(); textBox7.Text = e.TracePoint.Occurrence.ToString(); })); }
/// <summary> /// When an analog event arrives we dump the content. /// </summary> /// <param name="sender">used to identify the channel</param> /// <param name="e">content will be dumped</param> private void Instrument_AnalogTracePointArrived(object sender, AnalogTracePointEventArgs e) { IAnalogTraceContainer analogTrace = sender as IAnalogTraceContainer; if (analogTrace != null) { Console.WriteLine("{0}: [{1} - {2}]: {3} at {4} s", analogTrace.DetectorClass, analogTrace.Minimum, analogTrace.Maximum, e.TracePoint.Value, e.TracePoint.Occurrence.TotalSeconds); } }