private void AddLinks(InstallOptions options)
        {
            // Show a documentation Url if one is configured
            if (!String.IsNullOrEmpty(InstallConfiguration.DocumentationUrl))
            {
                string linkText  = InstallConfiguration.FormatString(CommonUIStrings.finishedLinkText);
                int    linkStart = linkText.Length - 5;
                AddLink(linkText, linkStart, 4, InstallConfiguration.DocumentationUrl);
            }

            // Add the for each target
            if (InstallConfiguration.FeatureScope == SPFeatureScope.Site &&
                !String.IsNullOrEmpty(InstallConfiguration.SiteCollectionRelativeConfigLink))
            {
                // Add site collection links
                AddSiteCollectionLinks(options.SiteCollectionTargets, FormatRelativeLink(InstallConfiguration.SiteCollectionRelativeConfigLink));
            }
            else if (InstallConfiguration.FeatureScope == SPFeatureScope.Farm &&
                     !String.IsNullOrEmpty(InstallConfiguration.SSPRelativeConfigLink))
            {
                // Add Shared Service Provider links
                // Note that thes are really Shared Resource Provider links - we just wish we knew how to only show links for a SSP and not SRPs
                AddSspLinks(options.WebApplicationTargets, FormatRelativeLink(InstallConfiguration.SSPRelativeConfigLink));
            }
        }
Example #2
0
        public RepairControl()
        {
            this.processControl = Program.CreateProcessControl();
            InitializeComponent();

            messageLabel.Text = InstallConfiguration.FormatString(messageLabel.Text);
        }
Example #3
0
        private static InstallerControl CreateWelcomeControl()
        {
            WelcomeControl control = new WelcomeControl();

            control.Title    = InstallConfiguration.FormatString(Resources.CommonUIStrings.controlTitleWelcome);
            control.SubTitle = InstallConfiguration.FormatString(Resources.CommonUIStrings.controlSubTitleWelcome);
            return(control);
        }
 private void AddSiteCollectionLinks(IList <SPSite> siteCollectionTargets, string relativeLink)
 {
     foreach (SPSite siteCollection in siteCollectionTargets)
     {
         string linkText = InstallConfiguration.FormatString(CommonUIStrings.finishedLinkTextSiteCollection, siteCollection.Url);
         AddLink(linkText, 6, 4, siteCollection.Url + relativeLink);
     }
 }
Example #5
0
        private static InstallerControl CreateSystemCheckControl()
        {
            SystemCheckControl control = new SystemCheckControl();

            control.Title    = Resources.CommonUIStrings.controlTitleSystemCheck;
            control.SubTitle = InstallConfiguration.FormatString(Resources.CommonUIStrings.controlSubTitleSystemCheck);

            control.RequireMOSS      = InstallConfiguration.RequireMoss;
            control.RequireSearchSKU = false;

            return(control);
        }
 private void AddSspLinks(IList <SPWebApplication> webApplicationTargets, string relativeLink)
 {
     foreach (SPWebApplication webApp in webApplicationTargets)
     {
         Hashtable properties = webApp.Properties;
         if (properties.ContainsKey("Microsoft.Office.Server.SharedResourceProvider"))
         {
             string linkText = InstallConfiguration.FormatString(CommonUIStrings.finishedLinkTextSsp, webApp.Sites[0].Url);
             AddLink(linkText, 6, 4, webApp.Sites[0].Url + relativeLink);
         }
     }
 }
        void CompletionControl_Load(object sender, EventArgs e)
        {
            // Conditionally show the FinishedControl
            if (InstallConfiguration.ShowFinishedControl && Form.Operation == InstallOperation.Install)
            {
                FinishedControl finishedControl = new FinishedControl();
                finishedControl.Title    = CommonUIStrings.finishedTitle;
                finishedControl.SubTitle = InstallConfiguration.FormatString(CommonUIStrings.finishedSubTitle);
                Form.ContentControls.Add(finishedControl);

                Form.NextButton.Enabled = true;
            }
        }
Example #8
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            InstallerForm form = new InstallerForm();

            form.Text = InstallConfiguration.FormatString("{SolutionTitle}");

            form.ContentControls.Add(CreateWelcomeControl());
            form.ContentControls.Add(CreateSystemCheckControl());

            Application.Run(form);
        }
        public UpgradeControl()
        {
            this.processControl = Program.CreateProcessControl();
            InitializeComponent();

            messageLabel.Text = InstallConfiguration.FormatString(messageLabel.Text);

            string upgradeDescription = InstallConfiguration.UpgradeDescription;

            if (upgradeDescription != null)
            {
                upgradeDescriptionLabel.Text = upgradeDescription;
            }
        }
        private void FinalizeChecks()
        {
            if (errors == 0)
            {
                ConfigureControls();
                Form.NextButton.Enabled = true;
                messageLabel.Text       = CommonUIStrings.messageLabelTextSuccess;
            }
            else
            {
                messageLabel.Text = InstallConfiguration.FormatString(CommonUIStrings.messageLabelTextError);
            }

            Form.PrevButton.Enabled = true;
        }
            protected override SystemCheckResult DoExecute()
            {
                Guid solutionId = Guid.Empty;

                try
                {
                    solutionId = InstallConfiguration.SolutionId;
                }
                catch (ArgumentNullException)
                {
                    throw new InstallException(CommonUIStrings.installExceptionConfigurationNoId);
                }
                catch (FormatException)
                {
                    throw new InstallException(CommonUIStrings.installExceptionConfigurationInvalidId);
                }

                try
                {
                    solution = SPFarm.Local.Solutions[solutionId];
                    if (solution != null)
                    {
                        this.OkText = InstallConfiguration.FormatString(CommonUIStrings.solutionCheckOkTextInstalled);
                    }
                    else
                    {
                        this.OkText = InstallConfiguration.FormatString(CommonUIStrings.solutionCheckOkTextNotInstalled);
                    }
                }

                catch (NullReferenceException)
                {
                    throw new InstallException(CommonUIStrings.installExceptionDatabase);
                }

                catch (Exception ex)
                {
                    throw new InstallException(ex.Message, ex);
                }

                return(SystemCheckResult.Success);
            }
        private void InitializeChecks()
        {
            this.tableLayoutPanel.SuspendLayout();

            //
            // WSS Installed Check
            //
            WSSInstalledCheck wssCheck = new WSSInstalledCheck();

            wssCheck.QuestionText = CommonUIStrings.wssCheckQuestionText;
            wssCheck.OkText       = CommonUIStrings.wssCheckOkText;
            wssCheck.ErrorText    = CommonUIStrings.wssCheckErrorText;
            AddCheck(wssCheck);

            //
            // MOSS Installed Check
            //
            if (requireMOSS)
            {
                MOSSInstalledCheck mossCheck = new MOSSInstalledCheck();
                mossCheck.QuestionText = CommonUIStrings.mossCheckQuestionText;
                mossCheck.OkText       = CommonUIStrings.mossCheckOkText;
                mossCheck.ErrorText    = CommonUIStrings.mossCheckErrorText;
                AddCheck(mossCheck);
            }

            //
            // Admin Rights Check
            //
            AdminRightsCheck adminRightsCheck = new AdminRightsCheck();

            adminRightsCheck.QuestionText = CommonUIStrings.adminRightsCheckQuestionText;
            adminRightsCheck.OkText       = CommonUIStrings.adminRightsCheckOkText;
            adminRightsCheck.ErrorText    = CommonUIStrings.adminRightsCheckErrorText;
            AddCheck(adminRightsCheck);

            //
            // Admin Service Check
            //
            AdminServiceCheck adminServiceCheck = new AdminServiceCheck();

            adminServiceCheck.QuestionText = CommonUIStrings.adminServiceCheckQuestionText;
            adminServiceCheck.OkText       = CommonUIStrings.adminServiceCheckOkText;
            adminServiceCheck.ErrorText    = CommonUIStrings.adminServiceCheckErrorText;
            AddCheck(adminServiceCheck);

            //
            // Timer Service Check
            //
            TimerServiceCheck timerServiceCheck = new TimerServiceCheck();

            timerServiceCheck.QuestionText = CommonUIStrings.timerServiceCheckQuestionText;
            timerServiceCheck.OkText       = CommonUIStrings.timerServiceCheckOkText;
            timerServiceCheck.ErrorText    = CommonUIStrings.timerServiceCheckErrorText;
            AddCheck(timerServiceCheck);

            //
            // Solution File Check
            //
            SolutionFileCheck solutionFileCheck = new SolutionFileCheck();

            solutionFileCheck.QuestionText = CommonUIStrings.solutionFileCheckQuestionText;
            solutionFileCheck.OkText       = CommonUIStrings.solutionFileCheckOkText;
            AddCheck(solutionFileCheck);

            //
            // Solution Check
            //
            SolutionCheck solutionCheck = new SolutionCheck();

            solutionCheck.QuestionText = InstallConfiguration.FormatString(CommonUIStrings.solutionCheckQuestionText);
            solutionCheck.OkText       = InstallConfiguration.FormatString(CommonUIStrings.solutionFileCheckOkText);
            solutionCheck.ErrorText    = InstallConfiguration.FormatString(CommonUIStrings.solutionCheckErrorText);
            AddCheck(solutionCheck);

            //
            // Add empty row that will eat up the rest of the
            // row space in the layout table.
            //
            this.tableLayoutPanel.RowCount++;
            this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));

            this.tableLayoutPanel.ResumeLayout(false);
            this.tableLayoutPanel.PerformLayout();
        }
Example #13
0
        public WelcomeControl()
        {
            InitializeComponent();

            messageLabel.Text = InstallConfiguration.FormatString(messageLabel.Text);
        }