コード例 #1
0
 public ActivationDialog(IServices services, ActivationWizardAction wizardStartAction)
     : base(services)
 {
     this.wizardStartAction = wizardStartAction;
     this.InitializeComponent();
     InputMethod.SetIsInputMethodEnabled((DependencyObject)this, false);
 }
コード例 #2
0
        private void HandleWizardAction(ActivationWizardAction action)
        {
            switch (action)
            {
            case ActivationWizardAction.ChooseActivationType:
                this.CurrentPage = (ActivationWizardPageViewModelBase)this.chooseActivationTypePageViewModel;
                break;

            case ActivationWizardAction.PhoneNumber:
                this.CurrentPage = (ActivationWizardPageViewModelBase)this.phoneNumbersPageViewModel;
                break;

            case ActivationWizardAction.InstallationIds:
                this.CurrentPage = (ActivationWizardPageViewModelBase)this.installationIdPageViewModel;
                break;

            case ActivationWizardAction.ValidationIds:
                this.CurrentPage = (ActivationWizardPageViewModelBase)this.validationIdEntryPageViewModel;
                break;

            case ActivationWizardAction.AttemptOnlineActivation:
                this.CurrentPage = (ActivationWizardPageViewModelBase)this.internetActivationPageViewModel;
                break;

            case ActivationWizardAction.AttemptPhoneActivation:
                if (this.TryPhoneActivation())
                {
                    this.FinishActivation(StringTable.LicensingSuccessfulActivationMessage);
                    break;
                }
                int num = (int)this.services.GetService <IMessageDisplayService>().ShowMessage(new MessageBoxArgs()
                {
                    Message = StringTable.LicensingPhoneActivationFailedMessage,
                    Image   = MessageBoxImage.Exclamation
                });
                this.CurrentPage = (ActivationWizardPageViewModelBase)this.validationIdEntryPageViewModel;
                break;

            case ActivationWizardAction.SuccessfulInternetActivation:
                this.FinishActivation(StringTable.LicensingSuccessfulActivationMessage);
                break;

            case ActivationWizardAction.ProductAlreadyActivated:
                this.FinishActivation(StringTable.LicensingAlreadyActivatedMessage);
                break;

            case ActivationWizardAction.NoSkusToActivate:
                this.FinishActivation(StringTable.LicensingNoActivateableKeyMessage);
                break;

            case ActivationWizardAction.MultipleSkusToActivate:
                this.FinishActivation(StringTable.LicensingMultipleActivateableSkus);
                break;
            }
        }
コード例 #3
0
 public ActivationDialogCreator(IServices services, ActivationWizardAction wizardStartAction)
     : base(services)
 {
     this.wizardStartAction = wizardStartAction;
 }
コード例 #4
0
 public ActivationWizardViewModel(ActivationDataRepository dataRepository, IServices services, ActivationWizardAction startAction)
 {
     this.dataRepository = dataRepository;
     this.ActivationInfo = new ActivationInfo(this.dataRepository);
     this.services       = services;
     this.InitializeChildViewModels();
     this.HandleWizardAction(startAction);
 }