Пример #1
0
 public void OnSensorEnter(ISensor nativeSensor, NativeSensorState state)
 {
     if (state == NativeSensorState.Ready)
     {
         Guid    sensorId;
         HResult hr = nativeSensor.GetID(out sensorId);
         if (hr == HResult.Ok)
         {
             SensorManager.OnSensorsChanged(sensorId, SensorAvailabilityChange.Addition);
         }
     }
 }
Пример #2
0
 void ISensorEvents.OnLeave(Guid sensorIdArgs)
 {
     SensorManager.OnSensorsChanged(sensorIdArgs, SensorAvailabilityChange.Removal);
 }