实际上,我需要提示加载图像throwugh backgrounderworker,每当调用特定函数时,这里就是我的代码:
private void bgwFile_DoWork(object sender, DoWorkEventArgs e)
{
FormFieldsLoad();
}
private void bgwFile_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (e.Cancelled == true)
{
Status.Text = "cancelled";
}
else if (e.Error != null)
{
}
picprocess.SendToBack();
Status.Text = "Completed";
}
//Below Method where i have called RunWorkerAsync()
private void buttonUpload_Click(object sender, EventArgs e)
{
LoadFile(pdfFullPath, txtPassword.Text);
form = document.getDocumentCatalog().getAcroForm();
java.util.List FieldTypes = form.getFields();
availableFieldsTable.Clear();
btnLoad.Enabled = false;
Status.Text = "Document loaded successfully!!!";
picprocess.BringToFront();
bgwFile.RunWorkerAsync();
}
在运行上述代码时,它调用加载图像但没有显示输出它继续显示加载图像..它没有调用 RunWorkerCompleted
任何人都可以帮助我吗?
谢谢