private void ConfigureControls()
        {
            SolutionCheck check    = (SolutionCheck)checks["SolutionCheck"];
            SPSolution    solution = check.Solution;

            if (solution == null)
            {
                AddInstallControls();
            }

            else
            {
                Version installedVersion = InstallConfiguration.InstalledVersion;
                Version newVersion       = InstallConfiguration.SolutionVersion;

                if (newVersion != installedVersion)
                {
                    Form.ContentControls.Add(Program.CreateUpgradeControl());
                }
                else
                {
                    Form.ContentControls.Add(Program.CreateRepairControl());
                }
            }
        }
Пример #2
0
        private void ConfigureControls()
        {
            SolutionCheck check    = (SolutionCheck)checks ["SolutionCheck"];
            SPSolution    solution = check.Solution;

            if (solution == null)
            {
                AddInstallControls();
            }
            else
            {
                Version installedVersion = InstallConfiguration.InstalledVersion;
                Version newVersion       = InstallConfiguration.SolutionVersion;
                Version minVersion       = string.IsNullOrEmpty(InstallConfiguration.UpdateMinVersion) ? null : new Version(InstallConfiguration.UpdateMinVersion);

                if (newVersion != installedVersion)
                {
                    Form.ContentControls.Add(Program.CreateUpgradeControl((minVersion == null) || (installedVersion == null) || (installedVersion >= minVersion)));
                }
                else
                {
                    Form.ContentControls.Add(Program.CreateRepairControl((minVersion == null) || (installedVersion == null) || (installedVersion >= minVersion)));
                }
            }
        }
Пример #3
0
        protected void CheckSolutionVersionsAndSetCaption()
        {
            SolutionCheck check    = (SolutionCheck)checks["SolutionCheck"];
            SPSolution    solution = check.Solution;

            Version newVersion    = InstallConfiguration.SolutionVersion;
            string  solutionTitle = InstallConfiguration.SolutionTitle;
            string  caption;

            if (solution == null)
            {
                caption = string.Format("Install {0} {1}", solutionTitle, newVersion);
            }
            else
            {
                Version installedVersion = InstallConfiguration.InstalledVersion;
                if (newVersion != installedVersion)
                {
                    string upgradePrompt = string.Format(
                        "Upgrade {0} from {1} to {2}",
                        solutionTitle, installedVersion, newVersion);
                    caption = upgradePrompt;
                }
                else
                {
                    caption = string.Format("Repair/Remove {0} {1}", solutionTitle, newVersion);
                }
            }
            Form.SetSolutionInfo(caption);
        }
Пример #4
0
        private void ConfigureControls()
        {
            SolutionCheck check    = (SolutionCheck)checks["SolutionCheck"];
            SPSolution    solution = check.Solution;

            Version newVersion = InstallConfiguration.SolutionVersion;

            if (solution == null)
            {
                AddInstallControls();
            }
            else
            {
                Version installedVersion = InstallConfiguration.InstalledVersion;

                if (newVersion != installedVersion)
                {
                    string upgradePrompt = string.Format(
                        "Upgrade from version '{0}' to version '{1}'",
                        installedVersion, newVersion);
                    Form.StoreNextTitle(Resources.CommonUIStrings.controlTitleUpgradeRemove);
                    Form.ContentControls.Add(Program.CreateUpgradeControl(upgradePrompt));
                }
                else
                {
                    Form.StoreNextTitle(Resources.CommonUIStrings.controlTitleRepairRemove);
                    Form.ContentControls.Add(Program.CreateRepairControl());
                }

                if (InstallConfiguration.HasFeatureScope(Microsoft.SharePoint.SPFeatureScope.WebApplication) ||
                    InstallConfiguration.HasFeatureScope(Microsoft.SharePoint.SPFeatureScope.Site) ||
                    InstallConfiguration.HasFeatureScope(Microsoft.SharePoint.SPFeatureScope.Web)
                    )
                {
                    Form.StoreNextTitle(Resources.CommonUIStrings.controlSummaryActivations);
                    Form.ContentControls.Add(Program.CreateActivationsControl());
                }

                Form.StoreNextTitle(Resources.CommonUIStrings.controlSummaryInstalling);
                Form.ContentControls.Add(Program.CreateProcessControl());
            }
        }
Пример #5
0
        private void InitializeChecks()
        {
            Guid guid;

            this.tableLayoutPanel.SuspendLayout();

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

            wssCheck.QuestionText = res.CheckWss;
            wssCheck.OkText       = res.CheckWssYes;
            wssCheck.ErrorText    = res.CheckWssNo;
            AddCheck(wssCheck);

            //
            // MOSS Installed Check
            //
            if (requireMOSS)
            {
                MOSSInstalledCheck mossCheck = new MOSSInstalledCheck();
                mossCheck.QuestionText = res.CheckMoss;
                mossCheck.OkText       = res.CheckMossYes;
                mossCheck.ErrorText    = res.CheckMossNo;
                AddCheck(mossCheck);
            }

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

            adminRightsCheck.QuestionText = res.CheckAdmin;
            adminRightsCheck.OkText       = res.CheckAdminYes;
            adminRightsCheck.ErrorText    = res.CheckAdminNo;
            AddCheck(adminRightsCheck);

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

            adminServiceCheck.QuestionText = res.CheckService;
            adminServiceCheck.OkText       = res.CheckServiceYes;
            adminServiceCheck.ErrorText    = res.CheckServiceNo;
            AddCheck(adminServiceCheck);

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

            timerServiceCheck.QuestionText = res.CheckTimer;
            timerServiceCheck.OkText       = res.CheckTimerYes;
            timerServiceCheck.ErrorText    = res.CheckTimerNo;
            AddCheck(timerServiceCheck);

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

            solutionFileCheck.QuestionText = InstallConfiguration.FormatString(res.CheckFile);
            solutionFileCheck.OkText       = InstallConfiguration.FormatString(res.CheckFileYes);
            solutionFileCheck.ErrorText    = InstallConfiguration.FormatString(res.CheckFileNo);
            AddCheck(solutionFileCheck);

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

            solutionCheck.QuestionText = InstallConfiguration.FormatString(res.CheckSolution);
            solutionCheck.OkText       = InstallConfiguration.FormatString(res.CheckSolutionYes);
            solutionCheck.ErrorText    = InstallConfiguration.FormatString(res.CheckSolutionNo);
            AddCheck(solutionCheck);

            if (!string.IsNullOrEmpty(InstallConfiguration.Java))
            {
                JavaInstalledCheck javaCheck = new JavaInstalledCheck();
                javaCheck.QuestionText = string.Format(res.CheckJava, InstallConfiguration.Java);
                javaCheck.OkText       = string.Format(res.CheckJavaYes, InstallConfiguration.Java);
                javaCheck.ErrorText    = string.Format(res.CheckJavaNo, InstallConfiguration.Java);
                AddCheck(javaCheck);
            }

            if ((!string.IsNullOrEmpty(InstallConfiguration.LegacyLists)) && !Guid.Empty.Equals(guid = ProductPage.GetGuid(InstallConfiguration.LegacyLists, false)))
            {
                LegacyCheck legacyCheck = new LegacyCheck(guid);
                legacyCheck.ErrorText    = res.LegacyFail;
                legacyCheck.QuestionText = res.Legacy;
                legacyCheck.OkText       = res.LegacyOK;
                AddCheck(legacyCheck);
            }

            //
            // 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();
        }
        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();
        }
Пример #7
0
        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);

            //
            // WSS Version Check
            //
            if (MinSharePointVersion != "" || MaxSharePointVersion != "")
            {
                SharePointVersionCheck versionCheck = new SharePointVersionCheck(MinSharePointVersion, MaxSharePointVersion);
                versionCheck.QuestionText = string.Format(CommonUIStrings.versionCheckQuestionText, MinSharePointVersion, MaxSharePointVersion);
                string versionEquation = string.Format("{0} <= {1} <= {2}", MinSharePointVersion, SPFarm.Local.BuildVersion.ToString(), MaxSharePointVersion);
                if (MinSharePointVersion == "")
                {
                    versionEquation = string.Format("{0} <= {1}", SPFarm.Local.BuildVersion.ToString(), MaxSharePointVersion);
                }
                else if (MaxSharePointVersion == "")
                {
                    versionEquation = string.Format("{0} <= {1}", MinSharePointVersion, SPFarm.Local.BuildVersion.ToString());
                }
                versionCheck.OkText    = string.Format(CommonUIStrings.versionCheckOkText, versionEquation);
                versionCheck.ErrorText = string.Format(CommonUIStrings.versionCheckErrorText, versionEquation);
                AddCheck(versionCheck);
            }

            //
            // 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);

            //
            // Features Check
            //
            {
                FeaturesCheck check = new FeaturesCheck();
                check.QuestionText = InstallConfiguration.FormatString(CommonUIStrings.featuresCheckQuestionText);
                check.OkText       = "Finished checking features"; // TODO - shouldn't be used
                check.ErrorText    = "?";                          // not used
                AddCheck(check);
            }

            //
            // 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();
        }