private void StartMainApplication()
        {
            WPFDoEvents.SetHourglassCursor();

            // Initialise the web browser
            try
            {
                splashscreen_window.UpdateMessage("Installing browser components");
                GeckoInstaller.CheckForInstall();
                splashscreen_window.UpdateMessage("Initialising browser components");
                GeckoManager.Initialise();
                GeckoManager.RegisterPDFInterceptor();
            }
            catch (Exception ex)
            {
                Logging.Error(ex, "Problem initialising GeckoFX.");
            }

            // Fire up Qiqqa!
            splashscreen_window.UpdateMessage("Starting background processes");
            StartDaemonSingletons();

            splashscreen_window.UpdateMessage("Launching Qiqqa!");
            FireStartUseFeature();
            MainWindow window = new MainWindow();

            window.Show();

            Hide();
        }
Пример #2
0
        private void StartMainApplication()
        {
            WPFDoEvents.AssertThisCodeIsRunningInTheUIThread();
            WPFDoEvents.SetHourglassCursor();

            // Initialise the web browser
            try
            {
                StatusManager.Instance.UpdateStatus("AppStart", "Installing browser components");
                GeckoInstaller.CheckForInstall();
                StatusManager.Instance.UpdateStatus("AppStart", "Initialising browser components");
                GeckoManager.Initialise();
                GeckoManager.RegisterPDFInterceptor();
            }
            catch (Exception ex)
            {
                Logging.Error(ex, "Problem initialising GeckoFX.");
            }

            // Fire up Qiqqa!
            StatusManager.Instance.UpdateStatus("AppStart", "Starting background processes");
            SafeThreadPool.QueueUserWorkItem(o =>
            {
                StartDaemonSingletons();
            });

            StatusManager.Instance.UpdateStatus("AppStart", "Launching Qiqqa!");
            FireStartUseFeature();
            MainWindow window = new MainWindow();

            window.Show();

            Hide();
        }
        private void StartMainApplication()
        {
            WPFDoEvents.AssertThisCodeIsRunningInTheUIThread();

            // prevent invocation loop via close() call at the end of this function body:
            if (StandardWindowFactory.Has(nameof(MainWindow)))
            {
                return;
            }

            WPFDoEvents.SetHourglassCursor();

            ConfigurationManager.Instance.BaseDirectoryForQiqqaIsFixedFromNowOn = true;

            // Initialise the web browser
            try
            {
                StatusManager.Instance.UpdateStatus("AppStart", "Installing browser components");
                GeckoInstaller.CheckForInstall();
                StatusManager.Instance.UpdateStatus("AppStart", "Initialising browser components");
                GeckoManager.Initialise();
                GeckoManager.RegisterPDFInterceptor();
            }
            catch (Exception ex)
            {
                Logging.Error(ex, "Problem initialising GeckoFX.");
            }

            Logging.Info("Log the config+stats again now that we are sure to have loaded the working configuration:");
            ComputerStatistics.LogCommonStatistics(ConfigurationManager.GetCurrentConfigInfos());

            // Fire up Qiqqa!
            SafeThreadPool.QueueUserWorkItem(o =>
            {
                try
                {
                    // Perform any upgrade paths that we must
                    StatusManager.Instance.UpdateStatus("AppStart", "Upgrading old libraries");
                    UpgradeManager.RunUpgrades();

#if false
                    Thread.Sleep(15000);
#endif

                    StatusManager.Instance.UpdateStatus("AppStart", "Starting background processes");
                    WebLibraryManager.Instance.Kick();
                }
                catch (Exception ex)
                {
                    Logging.Error(ex, "Problem while starting up the Qiqqa core.");
                }
            });

            StatusManager.Instance.UpdateStatus("AppStart", "Launching Qiqqa!");
            FireStartUseFeature();

            StandardWindowFactory.Create(nameof(MainWindow), () =>
            {
                MainWindow window = new MainWindow();

                window.Show();

                return(window);
            });

            Hide();
            Close();
        }