Beispiel #1
0
            void ReleaseResources(SplashScreenInfo container)
            {
                lock (instanceLocker) {
                    instances.Remove(this);
                    if (instances.Count == 0 && hasUnhandledExceptionSubscriver)
                    {
                        SplashScreenHelper.InvokeAsync(Application.Current, UnsubscribeUnhandledException, DispatcherPriority.Send, AsyncInvokeMode.AsyncOnly);
                    }
                }
                var dispatcher = Dispatcher.FromThread(container.InternalThread);

                container.RelationInfo.Do(x => x.ParentClosed -= OnSplashScreenOwnerClosed);
                container.ReleaseResources();
                if (Closed != null)
                {
                    Closed.Invoke(this, EventArgs.Empty);
                }
                lock (internalLocker) {
                    infosForRelease.Remove(container);
                }
                try {
                    if (dispatcher != null)
                    {
                        dispatcher.BeginInvokeShutdown(DispatcherPriority.Normal);
                        Dispatcher.Run();
                    }
                } catch { }
            }
Beispiel #2
0
 void ReleaseResources(SplashScreenInfo container)
 {
     lock (instanceLocker) {
         instances.Remove(this);
     }
     container.RelationInfo.Do(x => x.ParentClosed -= OnSplashScreenOwnerClosed);
     container.ReleaseResources();
     lock (internalLocker) {
         infosForRelease.Remove(container);
     }
     Dispatcher.CurrentDispatcher.InvokeShutdown();
 }
Beispiel #3
0
            void ReleaseResources(SplashScreenInfo container)
            {
#if DEBUGTEST || DEBUG
                Test_IsWindowStylePatched = false;
#endif
                lock (instanceLocker) {
                    instances.Remove(this);
                }
                container.RelationInfo.Do(x => x.ParentClosed -= OnSplashScreenOwnerClosed);
                container.ReleaseResources();
                lock (internalLocker) {
                    infosForRelease.Remove(container);
                }
                Dispatcher.CurrentDispatcher.InvokeShutdown();
            }
 void ReleaseResources(SplashScreenInfo container)
 {
     lock (instanceLocker) {
         instances.Remove(this);
         if (instances.Count == 0 && hasUnhandledExceptionSubscriver)
         {
             SplashScreenHelper.InvokeAsync(Application.Current, UnsubscribeUnhandledException, DispatcherPriority.Send, AsyncInvokeMode.AsyncOnly);
         }
     }
     container.RelationInfo.Do(x => x.ParentClosed -= OnSplashScreenOwnerClosed);
     container.ReleaseResources();
     lock (internalLocker) {
         infosForRelease.Remove(container);
     }
     Dispatcher.CurrentDispatcher.InvokeShutdown();
 }