private void SetScanProgress(string text, int percentage)
{
try
{
bool _update = false;
if (labelControl2.Text != text)
{
labelControl2.Text = text;
_update = true;
}
if (Convert.ToInt32(progressBarControl1.EditValue) != percentage)
{
progressBarControl1.EditValue = percentage;
_update = true;
}
if (_update) Application.DoEvents();
}
catch (Exception)
{
}
}