XenAdmin.Wizards.PatchingWizard.PatchingWizard_PrecheckPage.ExecuteSolution C# (CSharp) Method

ExecuteSolution() private method

private ExecuteSolution ( PreCheckHostRow preCheckHostRow ) : void
preCheckHostRow PreCheckHostRow
return void
        private void ExecuteSolution(PreCheckHostRow preCheckHostRow)
        {
            bool cancelled;
            resolvePrechecksAction = preCheckHostRow.Problem.SolveImmediately(out cancelled);

            if (resolvePrechecksAction != null)
            {
                // disable all problems
                foreach (DataGridViewRow row in dataGridView1.Rows)
                {
                    PreCheckHostRow preCheckRow = row as PreCheckHostRow;
                    if (preCheckRow != null && preCheckRow.Problem != null)
                    {
                        preCheckRow.Enabled = false;
                    }
                }
                StartResolvePrechecksAction();
            }
            else
            {
                if (preCheckHostRow.Problem is WarningWithInformationUrl)
                    (preCheckHostRow.Problem as WarningWithInformationUrl).LaunchUrlInBrowser();
                else if (preCheckHostRow.Problem is ProblemWithInformationUrl)
                    (preCheckHostRow.Problem as ProblemWithInformationUrl).LaunchUrlInBrowser();

                else if (!cancelled)
                    using (var dlg = new ThreeButtonDialog(new ThreeButtonDialog.Details(SystemIcons.Information,
                                                                        string.Format(Messages.PATCHING_WIZARD_SOLVE_MANUALLY, preCheckHostRow.Problem.Description).Replace("\\n", "\n"),
                                                                        Messages.PATCHINGWIZARD_PRECHECKPAGE_TEXT)))
                    {
                        dlg.ShowDialog(this);
                    }
            }
        }