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

            return(wizard.InsertPage <TWizardPage>(wizard.Pages.Count()));
        }
Exemplo 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);
        }
Exemplo 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);
        }
Exemplo 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);
        }