Пример #1
0
        private Task OnShowWizardExecuteAsync(Type wizardType)
        {
            var wizard = _typeFactory.CreateInstance(wizardType) as IExampleWizard;

            wizard.ShowInTaskbarWrapper          = ShowInTaskbar;
            wizard.ShowHelpWrapper               = ShowHelp;
            wizard.AllowQuickNavigationWrapper   = AllowQuickNavigation;
            wizard.HandleNavigationStatesWrapper = HandleNavigationStates;
            wizard.CacheViewsWrapper             = CacheViews;

            if (UseFastForwardNavigationController)
            {
                wizard.NavigationControllerWrapper = _typeFactory.CreateInstanceWithParametersAndAutoCompletion <FastForwardNavigationController>(wizard);
            }

            if (!ShowSummaryPage)
            {
                var lastPage = wizard.Pages.Last();
                wizard.RemovePage(lastPage);
            }

            if (MarkAllPagesAsVisited)
            {
                wizard.Pages.ForEach(x => x.IsVisited = true);
            }

            return(_wizardService.ShowWizardAsync(wizard));
        }
Пример #2
0
        private Task OnShowWizardExecuteAsync()
        {
            var wizard = _typeFactory.CreateInstance <ExampleWizard>();

            wizard.ShowInTaskbarWrapper = ShowInTaskbar;

            return(_wizardService.ShowWizardAsync(wizard));
        }
Пример #3
0
        private Task OnShowWizardExecuteAsync()
        {
            var wizard = _typeFactory.CreateInstance <ExampleWizard>();

            wizard.ShowInTaskbarWrapper          = ShowInTaskbar;
            wizard.ShowHelpWrapper               = ShowHelp;
            wizard.HandleNavigationStatesWrapper = HandleNavigationStates;

            if (UseFastForwardNavigationController)
            {
                wizard.NavigationControllerWrapper = _typeFactory.CreateInstanceWithParametersAndAutoCompletion <FastForwardNavigationController>(wizard);
            }

            if (!ShowSummaryPage)
            {
                var lastPage = wizard.Pages.Last();
                wizard.RemovePage(lastPage);
            }

            return(_wizardService.ShowWizardAsync(wizard));
        }
Пример #4
0
        public static Task <bool?> ShowWizardAsync <TWizard>(this IWizardService wizardService, object model = null)
            where TWizard : IWizard
        {
            Argument.IsNotNull(() => wizardService);

            var typeFactory = wizardService.GetTypeFactory();

            IWizard wizard = null;

            if (model is not null)
            {
                Log.Debug("Creating wizard '{0}' with model '{1}'", typeof(TWizard).GetSafeFullName(false), ObjectToStringHelper.ToFullTypeString(model));

                wizard = typeFactory.CreateInstanceWithParametersAndAutoCompletion <TWizard>(model);
            }
            else
            {
                Log.Debug("Creating wizard '{0}'", typeof(TWizard).GetSafeFullName(false));

                wizard = typeFactory.CreateInstance <TWizard>();
            }

            return(wizardService.ShowWizardAsync(wizard));
        }
Пример #5
0
 private Task OnShowWizardExecuteAsync()
 {
     return(_wizardService.ShowWizardAsync <ExampleWizard>());
 }
Пример #6
0
 private async Task OnShowWizardExecuteAsync()
 {
     await _wizardService.ShowWizardAsync <ExampleWizard>();
 }