private void HideSplashWindow() { if (_splashWindow != null) { _splashWindow.Hide(); _splashWindow = null; } }
/// <summary> /// Loads the kernel. /// </summary> protected async void LoadKernel() { try { CompositionRoot = new ApplicationHost(); Logger = CompositionRoot.LogManager.GetLogger("App"); var splash = new SplashWindow(CompositionRoot.ApplicationVersion); splash.Show(); await CompositionRoot.Init(); splash.Hide(); var task = CompositionRoot.RunStartupTasks(); new MainWindow(CompositionRoot.LogManager, CompositionRoot, CompositionRoot.ServerConfigurationManager, CompositionRoot.UserManager, CompositionRoot.LibraryManager, CompositionRoot.JsonSerializer, CompositionRoot.DisplayPreferencesRepository).Show(); await task.ConfigureAwait(false); } catch (Exception ex) { Logger.ErrorException("Error launching application", ex); MessageBox.Show("There was an error launching Media Browser: " + ex.Message); // Shutdown the app with an error code Shutdown(1); } }
private void ShowSplashWindow() { var win = new SplashWindow(_appHost.ApplicationVersion); win.Show(); _splashWindow = win; }
private void ShowSplashWindow(Progress<double> progress) { var win = new SplashWindow(_appHost.ApplicationVersion, progress); win.Show(); _splashWindow = win; }