コード例 #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
ファイル: Battery.uwp.cs プロジェクト: jorik041/Essentials-1
 static void ReportUpdated(object sender, object e)
 => MainThread.BeginInvokeOnMainThread(OnBatteryInfoChanged);
コード例 #3
0
ファイル: Battery.uwp.cs プロジェクト: jorik041/Essentials-1
 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
ファイル: Power.uwp.cs プロジェクト: arun6202/XFSession
 static void ReportUpdated(object sender, object e)
 => MainThread.BeginInvokeOnMainThread(OnPowerChanged);
コード例 #7
0
ファイル: Battery.macos.cs プロジェクト: gywerd/CPUI
 static void PowerSourceNotification()
 => MainThread.BeginInvokeOnMainThread(OnBatteryInfoChanged);