private void OnMotionPositionMeasured(object sender, Motion_EventArgs e) { this.Dispatcher.BeginInvoke(new Action(delegate() { this.textBoxTimeTraceMicrometricBoltPosition.Text = Convert.ToString(e.Position, culture); })); }
private void OnMotionPositionMeasured(object sender, Motion_EventArgs e) { switch (_MeasureMode) { case KEITHLEY_2601A_MeasureMode.Voltage: { var measuredVoltage = _MeasureDevice.MeasureVoltage(_NumberOfAverages, _TimeDelay); if (!(double.IsNaN(e.Position) || double.IsNaN(measuredVoltage))) { AllEventsHandler.Instance.OnTimeTracePointReceived(null, new TimeTracePointReceived_EventArgs(e.Position, measuredVoltage)); } } break; case KEITHLEY_2601A_MeasureMode.Current: { var measuredCurrent = _MeasureDevice.MeasureCurrent(_NumberOfAverages, _TimeDelay); if (!(double.IsNaN(e.Position) || double.IsNaN(measuredCurrent))) { AllEventsHandler.Instance.OnTimeTracePointReceived(null, new TimeTracePointReceived_EventArgs(e.Position, measuredCurrent)); } } break; case KEITHLEY_2601A_MeasureMode.Resistance: { switch (_SourceMode) { case KEITHLEY_2601A_SourceMode.Voltage: { var measuredResistance = _MeasureDevice.MeasureResistance(_ValueThroughTheStructure, _NumberOfAverages, _TimeDelay, Hardware.SourceMode.Voltage); if (!(double.IsNaN(e.Position) || double.IsNaN(measuredResistance))) { AllEventsHandler.Instance.OnTimeTracePointReceived(null, new TimeTracePointReceived_EventArgs(e.Position, measuredResistance)); } } break; case KEITHLEY_2601A_SourceMode.Current: { var measuredResistance = _MeasureDevice.MeasureResistance(_ValueThroughTheStructure, _NumberOfAverages, _TimeDelay, Hardware.SourceMode.Current); if (!(double.IsNaN(e.Position) || double.IsNaN(measuredResistance))) { AllEventsHandler.Instance.OnTimeTracePointReceived(null, new TimeTracePointReceived_EventArgs(e.Position, measuredResistance)); } } break; default: break; } } break; case KEITHLEY_2601A_MeasureMode.Power: { switch (_SourceMode) { case KEITHLEY_2601A_SourceMode.Voltage: { var measuredPower = _MeasureDevice.MeasurePower(_ValueThroughTheStructure, _NumberOfAverages, _TimeDelay, Hardware.SourceMode.Voltage); if (!(double.IsNaN(e.Position) || double.IsNaN(measuredPower))) { AllEventsHandler.Instance.OnTimeTracePointReceived(null, new TimeTracePointReceived_EventArgs(e.Position, measuredPower)); } } break; case KEITHLEY_2601A_SourceMode.Current: { var measuredPower = _MeasureDevice.MeasurePower(_ValueThroughTheStructure, _NumberOfAverages, _TimeDelay, Hardware.SourceMode.Current); if (!(double.IsNaN(e.Position) || double.IsNaN(measuredPower))) { AllEventsHandler.Instance.OnTimeTracePointReceived(null, new TimeTracePointReceived_EventArgs(e.Position, measuredPower)); } } break; default: break; } } break; default: break; } }
private void OnMotionPositionMeasured(object sender, Motion_EventArgs e) { this.Dispatcher.BeginInvoke(new Action(delegate() { this.textBoxTimeTraceMicrometricBoltPosition.Text = Convert.ToString(e.Position, culture); })); }
private void OnMotionPositionMeasured(object sender, Motion_EventArgs e) { switch (_MeasureMode) { case KEITHLEY_2601A_MeasureMode.Voltage: { var measuredVoltage = _MeasureDevice.MeasureVoltage(_NumberOfAverages, _TimeDelay); if (!(double.IsNaN(e.Position) || double.IsNaN(measuredVoltage))) AllEventsHandler.Instance.OnTimeTracePointReceived(null, new TimeTracePointReceived_EventArgs(e.Position, measuredVoltage)); } break; case KEITHLEY_2601A_MeasureMode.Current: { var measuredCurrent = _MeasureDevice.MeasureCurrent(_NumberOfAverages, _TimeDelay); if (!(double.IsNaN(e.Position) || double.IsNaN(measuredCurrent))) AllEventsHandler.Instance.OnTimeTracePointReceived(null, new TimeTracePointReceived_EventArgs(e.Position, measuredCurrent)); } break; case KEITHLEY_2601A_MeasureMode.Resistance: { switch (_SourceMode) { case KEITHLEY_2601A_SourceMode.Voltage: { var measuredResistance = _MeasureDevice.MeasureResistance(_ValueThroughTheStructure, _NumberOfAverages, _TimeDelay, Hardware.SourceMode.Voltage); if (!(double.IsNaN(e.Position) || double.IsNaN(measuredResistance))) AllEventsHandler.Instance.OnTimeTracePointReceived(null, new TimeTracePointReceived_EventArgs(e.Position, measuredResistance)); } break; case KEITHLEY_2601A_SourceMode.Current: { var measuredResistance = _MeasureDevice.MeasureResistance(_ValueThroughTheStructure, _NumberOfAverages, _TimeDelay, Hardware.SourceMode.Current); if (!(double.IsNaN(e.Position) || double.IsNaN(measuredResistance))) AllEventsHandler.Instance.OnTimeTracePointReceived(null, new TimeTracePointReceived_EventArgs(e.Position, measuredResistance)); } break; default: break; } } break; case KEITHLEY_2601A_MeasureMode.Power: { switch (_SourceMode) { case KEITHLEY_2601A_SourceMode.Voltage: { var measuredPower = _MeasureDevice.MeasurePower(_ValueThroughTheStructure, _NumberOfAverages, _TimeDelay, Hardware.SourceMode.Voltage); if (!(double.IsNaN(e.Position) || double.IsNaN(measuredPower))) AllEventsHandler.Instance.OnTimeTracePointReceived(null, new TimeTracePointReceived_EventArgs(e.Position, measuredPower)); } break; case KEITHLEY_2601A_SourceMode.Current: { var measuredPower = _MeasureDevice.MeasurePower(_ValueThroughTheStructure, _NumberOfAverages, _TimeDelay, Hardware.SourceMode.Current); if (!(double.IsNaN(e.Position) || double.IsNaN(measuredPower))) AllEventsHandler.Instance.OnTimeTracePointReceived(null, new TimeTracePointReceived_EventArgs(e.Position, measuredPower)); } break; default: break; } } break; default: break; } }