Esempio n. 1
0
        public static TWizardPage AddPage <TWizardPage>(this IWizard wizard)
            where TWizardPage : IWizardPage
        {
            Argument.IsNotNull(() => wizard);

            return(wizard.InsertPage <TWizardPage>(wizard.Pages.Count()));
        }
Esempio n. 2
0
        public static IWizardPage AddPage(this IWizard wizard, IWizardPage page)
        {
            Argument.IsNotNull(() => wizard);
            Argument.IsNotNull(() => page);

            wizard.InsertPage(wizard.Pages.Count(), page);

            return(page);
        }
Esempio n. 3
0
        public static TWizardPage InsertPage <TWizardPage>(this IWizard wizard, int index)
            where TWizardPage : IWizardPage
        {
            Argument.IsNotNull(() => wizard);

            var typeFactory = wizard.GetTypeFactory();
            var page        = typeFactory.CreateInstance <TWizardPage>();

            wizard.InsertPage(index, page);

            return(page);
        }
Esempio n. 4
0
        public static TWizardPage InsertPage <TWizardPage>(this IWizard wizard, int index, object model)
            where TWizardPage : IWizardPage
        {
            Argument.IsNotNull(() => wizard);

            var typeFactory = wizard.GetTypeFactory();
            var page        = typeFactory.CreateInstanceWithParametersAndAutoCompletion <TWizardPage>(model);

            wizard.InsertPage(index, page);

            return(page);
        }