Ejemplo n.º 1
0
        private static PackageClass GetNewProject()
        {
            PackageClass packageClass = new PackageClass();

            packageClass.Groups.Items.Add(new GroupItem("Default"));
            packageClass.Sections.Add("Welcome Screen");
            packageClass.Sections.Items[0].WizardButtonsEnum = WizardButtonsEnum.NextCancel;
            packageClass.Sections.Add("Install Section");
            var item = new ActionItem("InstallFiles")
            {
                Params =
                    new SectionParamCollection(
                        MpeInstaller.ActionProviders["InstallFiles"].GetDefaultParams())
            };

            packageClass.Sections.Items[1].Actions.Add(item);
            packageClass.Sections.Items[1].WizardButtonsEnum = WizardButtonsEnum.Next;
            packageClass.Sections.Add("Setup Complete");
            packageClass.Sections.Items[2].WizardButtonsEnum = WizardButtonsEnum.Finish;

            packageClass.CreateMPDependency();

            return(packageClass);
        }