Beispiel #1
0
        public IDisposable SetApplicationBusy()
        {
            ApplicationBusyContext context = new ApplicationBusyContext()
            {
                DisposeCallback = ApplicationBusyContextDisposeCallback
            };

            applicationBusyContext.Add(context);
            IsApplicationBusy = true;
            return(context);
        }
Beispiel #2
0
 private void ApplicationBusyContextDisposeCallback(ApplicationBusyContext context)
 {
     applicationBusyContext.Remove(context);
     IsApplicationBusy = applicationBusyContext.Any();
 }