示例#1
0
文件: Ticker.cs 项目: zhamppx97/maui
 public virtual void Remove(int handle, IDispatcher dispatcher)
 {
     dispatcher.BeginInvokeOnMainThread(() =>
     {
         RemoveTimeout(handle);
     });
 }
 public static void Dispatch(this IDispatcher dispatcher, Action action)
 {
     if (dispatcher != null)
     {
         if (dispatcher.IsInvokeRequired)
         {
             dispatcher.BeginInvokeOnMainThread(action);
         }
         else
         {
             action();
         }
     }
     else
     {
         if (Device.IsInvokeRequired)
         {
             Device.BeginInvokeOnMainThread(action);
         }
         else
         {
             action();
         }
     }
 }
示例#3
0
 static private void UpdateStatus(string message, string toast, Label label, IDispatcher dispatcher)
 {
     dispatcher.BeginInvokeOnMainThread(() =>
     {
         label.Text = message;
     });
 }
示例#4
0
 internal void Navigated(IDispatcher dispatcher)
 {
     dispatcher.BeginInvokeOnMainThread(() =>
     {
         ShowWebView = true;
         ShowLoading = false;
     });
 }