public static Accelaccelerometer GetInstance()
 {
     lock (LockObject)
     {
         if (_instance == null)
         {
             _instance = new Accelaccelerometer();
             _instance.Init();
         }
         return _instance;
     }
 }
Exemplo n.º 2
0
 static void Accelaccelerometer_MeasurementComplete(Accelaccelerometer sender, Accelaccelerometer.SensorData sensorData)
 {
     Debug.Print(sensorData.ToString());
 }
 //    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(Accelaccelerometer sender, SensorData sensorData)
 {
     if (_OnMeasurementComplete == null)
         _OnMeasurementComplete = OnMeasurementCompleteEvent;
 }