コード例 #1
0
ファイル: App.xaml.cs プロジェクト: Kampari/MediaBrowser
 private void HideSplashWindow()
 {
     if (_splashWindow != null)
     {
         _splashWindow.Hide();
         _splashWindow = null;
     }
 }
コード例 #2
0
ファイル: App.xaml.cs プロジェクト: 0sm0/MediaBrowser
        /// <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);
            }
        }
コード例 #3
0
ファイル: App.xaml.cs プロジェクト: Kampari/MediaBrowser
        private void ShowSplashWindow()
        {
            var win = new SplashWindow(_appHost.ApplicationVersion);
            win.Show();

            _splashWindow = win;
        }
コード例 #4
0
ファイル: App.xaml.cs プロジェクト: RomanDengin/MediaBrowser
        private void ShowSplashWindow(Progress<double> progress)
        {
            var win = new SplashWindow(_appHost.ApplicationVersion, progress);
            win.Show();

            _splashWindow = win;
        }