Exemplo n.º 1
0
        private void OnFirstIdle()
        {
            PerformanceUtility.StartPerformanceSequence(PerformanceEvent.StartupCacheWarmUp);
            PerformanceUtility.EndPerformanceSequence(PerformanceEvent.PostingFirstIdleandCallingApplicationRun);
            ICommandLineService service1 = this.Services.GetService <ICommandLineService>();

            this.CloseWelcomeSplashScreen();
            ILicenseService service2 = this.Services.GetService <ILicenseService>();

            BlendApplication.InitializeLicensingDialogResource(service2);
            if (!(service2 is LicenseService) || !LicensingDialogHelper.EnsureProductIsLicensed(this.Services, 0))
            {
                this.Shutdown(-1);
            }
            else
            {
                this.MainWindow.IsEnabled = true;
                this.MainWindow.Focus();
                if (service1.GetArguments("PerfTest") != null)
                {
                    string[] arguments = service1.GetArguments("PerfTest");
                    if (arguments.Length == 1)
                    {
                        new PerformanceTester(this.Services).RunTestFile(arguments[0]);
                    }
                }
                else
                {
                    IProjectManager service3 = this.Services.GetService <IProjectManager>();
                    service3.InitializeRecentProjects();
                    if (this.Services.GetService <IFeedbackService>().ShouldPromptAtStartup)
                    {
                        new FeedbackOptionsCommand(this.Services).Execute();
                    }
                    BlendSdkHelper.PromptUserForMissingSdk(this.Services);
                    this.ShowMefComposeError();
                    bool     flag      = true;
                    string[] arguments = service1.GetArguments(string.Empty);
                    if (arguments == null || arguments.Length != 1)
                    {
                        IConfigurationObject configurationObject = this.Services.GetService <IConfigurationService>()["WindowService"];
                        if (configurationObject != null)
                        {
                            object property = configurationObject.GetProperty("SkipWelcomeScreen");
                            if (property != null && property is bool && (bool)property)
                            {
                                flag = false;
                            }
                        }
                    }
                    if (service1.GetArgument("SkipWelcomeScreen") != null || this.TestingStartup)
                    {
                        flag = false;
                    }
                    service3.InitializeFromKnownProjects((string[])null);
                    if (flag && service3.CurrentSolution == null)
                    {
                        WelcomeScreen.Show(this.Services);
                    }
                }
                string[] arguments1 = service1.GetArguments("actions");
                if (arguments1 != null && arguments1.Length == 1)
                {
                    new ActionProcessor().ProcessActionFile(arguments1[0], this.Services);
                }
                this.Services.GetService <SplashService>().UpdateSplashVersion(service2);
            }
        }
 public override void Execute()
 {
     WelcomeScreen.Show(this.services);
 }
Exemplo n.º 3
0
 public static void Show(IServices services)
 {
     WelcomeScreen welcomeScreen = new WelcomeScreen(services);
 }