示例#1
0
        /// <summary>
        /// Builds the InstallerWizard based on a set of features.
        /// </summary>
        /// <param name="feature">The root feature.</param>
        /// <param name="features">The feature tree.</param>
        public void BuildWizard(Feature feature, FeatureTree features)
        {
            foreach (Feature childFeature in feature.Features.Where(x => x.ShouldInstall))
            {
                BuildWizard(childFeature, features);
            }

            if (feature.ShouldInstall)
            {
                foreach (string dependency in feature.Dependencies)
                {
                    Feature dependencyFeature = features[dependency];

                    if (dependencyFeature != null)
                    {
                        BuildWizardProcessDependency(dependencyFeature, features);
                    }
                }

                foreach (InstallerPageDescriptor page in feature.Pages)
                {
                    if (!HasPageType(page.Type))
                    {
                        AddPage(page.Type, page.Name, page.Description, page.IsFinishPage, page.IsDeploymentPage);
                    }
                }
            }
        }
示例#2
0
        private void BuildWizardProcessDependency(Feature dependencyFeature, FeatureTree features)
        {
            foreach (string childDependencyFeatureName in dependencyFeature.Dependencies)
            {
                Feature childDependencyFeature = features[childDependencyFeatureName];

                if (childDependencyFeature != null)
                {
                    BuildWizardProcessDependency(childDependencyFeature, features);
                }
            }

            foreach (InstallerPageDescriptor featurePage in dependencyFeature.Pages.Where(x => !x.IsDeploymentPage))
            {
                if (!HasPageType(featurePage.Type))
                {
                    AddPage(featurePage.Type, featurePage.Name, featurePage.Description, featurePage.IsFinishPage, featurePage.IsDeploymentPage);
                }
            }
        }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InstallationConfiguration"/> class.
 /// </summary>
 public InstallationConfiguration()
 {
     Features        = new FeatureTree();
     UpdateAvailable = true;
 }