예제 #1
0
 //    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;
 }
예제 #2
0
 static void Magnetometer_MeasurementComplete(Magnetometer sender, Magnetometer.SensorData sensorData)
 {
     Debug.Print(sensorData.ToString());
 }
예제 #3
0
 public static Magnetometer GetInstance()
 {
     lock (LockObject)
     {
         if (_instance == null)
         {
             _instance = new Magnetometer();
             _instance.Init();
         }
         return _instance;
     }
 }