Exemple #1
0
        internal bool TryStart()
        {
            logger.Info("Initiating startup procedure...");

            operations.ActionRequired  += Operations_ActionRequired;
            operations.ProgressChanged += Operations_ProgressChanged;
            operations.StatusChanged   += Operations_StatusChanged;

            splashScreen.Show();
            splashScreen.BringToForeground();

            var success = operations.TryPerform() == OperationResult.Success;

            if (success)
            {
                RegisterEvents();
                ShowShell();
                AutoStartApplications();

                var communication = runtime.InformClientReady();

                if (communication.Success)
                {
                    logger.Info("Application successfully initialized.");
                    logger.Log(string.Empty);
                }
                else
                {
                    success = false;
                    logger.Error("Failed to inform runtime that client is ready!");
                }
            }
            else
            {
                logger.Info("Application startup aborted!");
                logger.Log(string.Empty);
            }

            splashScreen.Hide();

            return(success);
        }
        public bool TryStart()
        {
            logger.Info("Initiating startup procedure...");

            splashScreen = uiFactory.CreateSplashScreen();
            operations.ProgressChanged += Operations_ProgressChanged;
            operations.StatusChanged   += Operations_StatusChanged;

            var success = operations.TryPerform() == OperationResult.Success;

            if (success)
            {
                RegisterEvents();
                ShowShell();
                StartBrowser();

                var communication = runtime.InformClientReady();

                if (communication.Success)
                {
                    logger.Info("Application successfully initialized.");
                    logger.Log(string.Empty);
                }
                else
                {
                    success = false;
                    logger.Error("Failed to inform runtime that client is ready!");
                }
            }
            else
            {
                logger.Info("Application startup aborted!");
                logger.Log(string.Empty);
            }

            splashScreen.Close();

            return(success);
        }