예제 #1
0
        internal static void OnChanged(MagnetometerChangedEventArgs e)
        {
            var handler = ReadingChanged;

            if (handler == null)
            {
                return;
            }

            if (useSyncContext)
            {
                MainThread.BeginInvokeOnMainThread(() => handler?.Invoke(null, e));
            }
            else
            {
                handler?.Invoke(null, e);
            }
        }
예제 #2
0
 static void ReportUpdated(object sender, object e)
 => MainThread.BeginInvokeOnMainThread(OnBatteryInfoChanged);
예제 #3
0
 static void ReportEnergySaverUpdated(object sender, object e)
 => MainThread.BeginInvokeOnMainThread(OnEnergySaverChanged);
예제 #4
0
 static void BatteryChangedNotification(object sender, NSNotificationEventArgs args)
 => MainThread.BeginInvokeOnMainThread(OnBatteryChanged);
예제 #5
0
 static void PowerChangedNotification(NSNotification notification)
 => MainThread.BeginInvokeOnMainThread(OnPowerChanged);
예제 #6
0
 static void ReportUpdated(object sender, object e)
 => MainThread.BeginInvokeOnMainThread(OnPowerChanged);
예제 #7
0
 static void PowerSourceNotification()
 => MainThread.BeginInvokeOnMainThread(OnBatteryInfoChanged);