Beispiel #1
0
 T _UI <T>(Func <T> a)
 {
     if (UIDispatcher.CheckAccess())
     {
         return(a());
     }
     return(UIDispatcher.Invoke(a, DispatcherPriority.Send));
 }
Beispiel #2
0
 void _UI(Action a)
 {
     if (UIDispatcher.CheckAccess())
     {
         a();
         return;
     }
     UIDispatcher.Invoke(a, DispatcherPriority.Send);
 }
        private void UpdateRestoreBar(bool packagesMissing)
        {
            if (!UIDispatcher.CheckAccess())
            {
                UIDispatcher.Invoke(
                    (Action <bool>)UpdateRestoreBar,
                    packagesMissing);
                return;
            }

            if (packagesMissing)
            {
                ResetUI();
            }
            else
            {
                // In order to hide the restore bar:
                // * stop the reveal animation, in case it was still going.
                // * begin the hide animation.
                showRestoreBar.Stop();
                hideRestoreBar.Begin();
            }
        }