コード例 #1
0
 void Accelerometer_ReadingChanged(object sender, BandSensorReadingEventArgs<IBandAccelerometerReading> e)
 {
     CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
          () =>
        {
        SensorReading reading = new SensorReading { X = e.SensorReading.AccelerationX, Y = e.SensorReading.AccelerationY, Z = e.SensorReading.AccelerationZ };
        _prev = _last;
        _last = reading;
        Recalculate();
     });
 }
コード例 #2
0
 void Accelerometer_ReadingChanged(object sender, BandSensorReadingEventArgs <IBandAccelerometerReading> e)
 {
     CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                                                             () =>
     {
         SensorReading reading = new SensorReading {
             X = e.SensorReading.AccelerationX, Y = e.SensorReading.AccelerationY, Z = e.SensorReading.AccelerationZ
         };
         _prev = _last;
         _last = reading;
         Recalculate();
     });
 }