private void InitializePages()
        {
            this.designTimeAuthenticationViewModel              = new DesignTimeAuthenticationViewModel();
            this.designTimeAuthenticationViewModel.PageLeaving += DesignTimeAuthenticationViewModel_PageLeaving;
            this.runtimeAuthenticationTypeViewModel             = new RuntimeAuthenticationTypeViewModel();
            this.runtimeAuthenticationConfigViewModel           = new RuntimeAuthenticationConfigViewModel(
                () => this.designTimeAuthenticationViewModel.Authentication?.MyDomain);
            this.runtimeAuthenticationConfigViewModel.RuntimeAuthStrategy = this.runtimeAuthenticationTypeViewModel.RuntimeAuthStrategy;
            this.objectSelectionViewModel = new ObjectSelectionViewModel();

            this.Pages.Add(this.designTimeAuthenticationViewModel);
            this.Pages.Add(this.runtimeAuthenticationTypeViewModel);
            this.Pages.Add(this.runtimeAuthenticationConfigViewModel);
            this.Pages.Add(this.objectSelectionViewModel);

            // Some logic within the view models depend on the Wizard.  This logic must be invoked after the pages have
            // been added to the wizard in order for the Wizard property to be available on the ConnectedServiceWizardPage.
            if (this.Context.IsUpdating)
            {
                this.RestoreAuthenticationSettings();
            }

            foreach (SalesforceConnectedServiceWizardPage page in this.Pages)
            {
                page.PropertyChanged += this.PageViewModel_PropertyChanged;
            }
        }
예제 #2
0
        public RuntimeAuthenticationTypePage(RuntimeAuthenticationTypeViewModel runtimeAuthenticationTypeViewModel)
        {
            this.InitializeComponent();

            this.DataContext = runtimeAuthenticationTypeViewModel;
        }