T _UI <T>(Func <T> a) { if (UIDispatcher.CheckAccess()) { return(a()); } return(UIDispatcher.Invoke(a, DispatcherPriority.Send)); }
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(); } }