internal static InstallerControl CreateDeploymentTargetsControl()
        {
            InstallerControl control      = null;
            SPFeatureScope   featureScope = InstallConfiguration.FeatureScope;

            if (featureScope == SPFeatureScope.Farm)
            {
                control          = new DeploymentTargetsControl();
                control.Title    = res.FarmDeploymentTargets;
                control.SubTitle = res.FarmDeploymentTargets2;
            }
            else if (featureScope == SPFeatureScope.Site)
            {
                control          = new SiteCollectionDeploymentTargetsControl();
                control.Title    = res.SiteDeploymentTargets;
                control.SubTitle = res.SiteDeploymentTargets2;
            }
            return(control);
        }
Esempio n. 2
0
        private void ReplaceContentControl(int index)
        {
            if (currentContentControl != null)
            {
                currentContentControl.Close(options);
            }

            if (index == 0)
            {
                prevButton.Enabled = false;
                nextButton.Enabled = true;
            }
            else if (index == (contentControls.Count - 1))
            {
                prevButton.Enabled = true;
                nextButton.Enabled = false;
            }
            else
            {
                prevButton.Enabled = true;
                nextButton.Enabled = true;
            }

            InstallerControl newContentControl = contentControls [index];

            newContentControl.Dock = DockStyle.Fill;

            titleLabel.Text    = newContentControl.Title;
            subTitleLabel.Text = newContentControl.SubTitle;

            contentPanel.Controls.Clear();
            contentPanel.Controls.Add(newContentControl);

            newContentControl.Open(options);

            currentContentControl = newContentControl;
        }