private void OnReadingChanged(object sender, AccelerometerChangedEventArgs e) { ReadingChanged?.Invoke(this, new AccelerometerChangeEventArgs() { X = e.Reading.Acceleration.X, Y = e.Reading.Acceleration.Y, Z = e.Reading.Acceleration.Z }); }
internal static void OnChanged(OrientationSensorChangedEventArgs e) { if (useSyncContext) { MainThread.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(null, e)); } else { ReadingChanged?.Invoke(null, e); } }
static void OnChanged(BarometerChangedEventArgs e) { if (useSyncContext) { MainThread.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(null, e)); } else { ReadingChanged?.Invoke(null, e); } }
void RaiseReadingChanged(BarometerData reading) { var args = new BarometerChangedEventArgs(reading); if (UseSyncContext) { MainThread.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(this, args)); } else { ReadingChanged?.Invoke(this, args); } }
void RaiseReadingChanged(GyroscopeData data) { var args = new GyroscopeChangedEventArgs(data); if (UseSyncContext) { MainThread.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(null, args)); } else { ReadingChanged?.Invoke(null, args); } }
public bool Start() { _sensor.ReportInterval = Math.Max(_sensor.MinimumReportInterval, 16); if (ReadingChanged.GetInvocationList().Length < 1) { return(false); } _sensor.ReadingChanged += ReadingChanged; _IsRunning = true; return(true); }
internal void RaiseReadingChanged(OrientationSensorData reading) { var args = new OrientationSensorChangedEventArgs(reading); if (UseSyncContext) { MainThread.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(null, args)); } else { ReadingChanged?.Invoke(null, args); } }
internal void RaiseReadingChanged(CompassData data) { var args = new CompassChangedEventArgs(data); if (UseSyncContext) { MainThread.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(null, args)); } else { ReadingChanged?.Invoke(null, args); } }
internal static void OnChanged(CompassChangedEventArgs e) { if (ReadingChanged == null) { return; } if (UseSyncContext) { Platform.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(e)); } else { ReadingChanged?.Invoke(e); } }
internal static void OnChanged(AccelerometerChangedEventArgs e) { if (useSyncContext) { MainThread.BeginInvokeOnMainThread(() => ReadingChanged?.Invoke(null, e)); } else { ReadingChanged?.Invoke(null, e); } if (ShakeDetected != null) { ProcessShakeEvent(e.Reading.Acceleration); } }
/// <summary> /// Raises the ReadingChanged event. /// </summary> /// <param name="e"></param> protected virtual void OnReadingChanged(AccelerometerReadingChangedEventArgs e) { ReadingChanged?.Invoke(this, e); }
private void OnLuxChanged(double lux) { ReadingChanged?.Invoke(this, lux); }