public void Progress(string description, int percentage)
{
if (InvokeRequired) {
Invoke(new ProgressDelegate(Progress), new object[] { description, percentage });
return;
}
if (progressBar.Style != ProgressBarStyle.Blocks)
progressBar.Style = ProgressBarStyle.Blocks;
progressBar.Value = percentage;
if (description.Trim().Length > 0)
this.Text = description;
}