void StartLoading()
{
if (isLoadingNow)
{ // Cancel the asynchronous operation.
bgWorker.CancelAsync();
return;
}
Cursor = Cursors.WaitCursor;
progressBar.Value = 0;
warningMessage = string.Empty;
isLoadingNow = true;
progressPercent = 0;
lblProgress.Visible = true;
chbAutoscan.Visible = false;
chbTickScan.Visible = false;
btnClose.Text = Language.T("Cancel");
// Start the bgWorker
bgWorker.RunWorkerAsync();
return;
}