private bool TryPhoneActivation()
        {
            IActivateResponse activateResponse = this.dataRepository.TryPhoneActivation((IList <PhoneActivationData>) this.ActivationInfo.ValidationIds);

            LicensingDialogHelper.ShowErrorMessageFromResponse((ILicenseSubServiceResponse)activateResponse, this.services.GetService <IMessageDisplayService>());
            return(activateResponse.ActivationStatus != ActivationStatus.Failed);
        }
예제 #2
0
 private void ShowMessageOnError(IActivateResponse activateResponse)
 {
     if (activateResponse.ActivationStatus != ActivationStatus.Failed)
     {
         return;
     }
     LicensingDialogHelper.ShowErrorMessageFromResponse((ILicenseSubServiceResponse)this.internetActivationResponse, this.services.GetService <IMessageDisplayService>());
 }
예제 #3
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);
            }
        }