private void _worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (!e.Cancelled)
OnPageUpdated();
progressBar1.Value = 100;
labelProgress.Text = string.Empty;
bool showResolveAllButton = false;
foreach (PreCheckGridRow row in dataGridView1.Rows)
{
PreCheckHostRow hostRow = row as PreCheckHostRow;
//CA-65508: if the problem cannot be solved immediately there's no point in enabling the Resolve All button
//CA-136211: Changed the code below to enable the Resolve All button only when there is at least one problem and all the problems have solution/fix.
if (hostRow != null && hostRow.IsProblem)
{
if (!hostRow.IsFixable)
{
showResolveAllButton = false;
break;
}
else
{
showResolveAllButton = true;
}
}
}
buttonResolveAll.Enabled = showResolveAllButton;
buttonReCheckProblems.Enabled = checkBoxViewPrecheckFailuresOnly.Enabled = true;
}