protected override void OnExit(ExitEventArgs e) { var applicationTracker = CustomContainer.Get <IApplicationTracker>(); //Stop the action tracking applicationTracker?.DisableApplicationTracker(); SplashView.CloseSplash(true); // this is already handled ;) _shellViewModel?.PersistTabs(true); ProgressFileDownloader.PerformCleanup(new DirectoryWrapper(), GlobalConstants.VersionDownloadPath, new FileWrapper()); HasShutdownStarted = true; DebugDispatcher.Instance.Shutdown(); try { base.OnExit(e); } catch { // Best effort ;) } ForceShutdown(); }
public new void Shutdown() { try { SplashView.CloseSplash(true); base.Shutdown(); } catch (Exception e) { Dev2Logger.Warn(e.Message, GlobalConstants.WarewolfWarn); } ForceShutdown(); }
protected void InitializeShell(System.Windows.StartupEventArgs e) { _resetSplashCreated = new ManualResetEvent(false); _splashThread = new Thread(ShowSplash); _splashThread.SetApartmentState(ApartmentState.STA); _splashThread.IsBackground = true; _splashThread.Name = "Splash Screen"; _splashThread.Start(); _resetSplashCreated.WaitOne(); new Bootstrapper().Start(); if (_hasDotNetFramweworkError) { SplashView.CloseSplash(false); var popupController = CustomContainer.Get <IPopupController>(); popupController.ShowInstallationErrorOccurred(); Shutdown(); } base.OnStartup(e); _shellViewModel = MainWindow.DataContext as ShellViewModel; if (_shellViewModel != null) { CreateDummyWorkflowDesignerForCaching(); SplashView.CloseSplash(false); if (e.Args.Length > 0) { OpenBasedOnArguments(new WarwolfStartupEventArgs(e)); } else { _shellViewModel.ShowStartPageAsync(); } CheckForDuplicateResources(); _appExceptionHandler = new AppExceptionHandler(this, _shellViewModel); CustomContainer.Register <IApplicationAdaptor>(new ApplicationAdaptor(Current)); CustomContainer.Register <IShellViewModel>(_shellViewModel); } var toolboxPane = Current.MainWindow.FindName("Toolbox") as ContentPane; toolboxPane?.Activate(); #if DEBUG SetAsStarted(); }
protected override void OnExit(ExitEventArgs e) { SplashView.CloseSplash(true); // this is already handled ;) _shellViewModel?.PersistTabs(true); ProgressFileDownloader.PerformCleanup(new DirectoryWrapper(), GlobalConstants.VersionDownloadPath, new FileWrapper()); HasShutdownStarted = true; DebugDispatcher.Instance.Shutdown(); try { base.OnExit(e); } catch { // Best effort ;) } ForceShutdown(); }