// public static EventHandler<SensorData> MeasurementComplete; /// <summary> /// Raises the <see cref="MeasurementComplete"/> event. /// </summary> /// <param name="sender">The object that raised the event.</param> /// <param name="sensorData">The <see cref="SensorData"/> object that contains the results of the measurement.</param> public void OnMeasurementCompleteEvent(Magnetometer sender, SensorData sensorData) { if (_OnMeasurementComplete == null) _OnMeasurementComplete = OnMeasurementCompleteEvent; }
static void Magnetometer_MeasurementComplete(Magnetometer sender, Magnetometer.SensorData sensorData) { Debug.Print(sensorData.ToString()); }
public static Magnetometer GetInstance() { lock (LockObject) { if (_instance == null) { _instance = new Magnetometer(); _instance.Init(); } return _instance; } }