public void searchBackground(String searchData)
 {
     backgroudWoker         = new BackgroundWorker();
     backgroudWoker.DoWork += new DoWorkEventHandler(searchDoWrok);
     backgroudWoker.WorkerSupportsCancellation = true;
     backgroudWoker.RunWorkerCompleted        += new RunWorkerCompletedEventHandler(searchRunWorkerCompletedEventHandler);
     waitForm = new WaitForm();
     waitForm.setStyle(ProgressBarStyle.Blocks);
     waitForm.setLabel("Please wait while loading records");
     waitForm.FormClosing += new FormClosingEventHandler(waitFormClosingEventHandler);
     backgroudWoker.RunWorkerAsync(searchData);
     waitForm.ShowDialog();
 }
Exemple #2
0
 private void extractFile()
 {
     waitForm = new WaitForm();
     waitForm.setLabel("extracting file");
     waitForm.FormClosing += new FormClosingEventHandler(waitFormClosingEventHandler);
     waitForm.setStyle(ProgressBarStyle.Marquee);
     waitForm.end("");
     backgroudWoker                            = new BackgroundWorker();
     backgroudWoker.DoWork                    += new DoWorkEventHandler(extractFileDoWork);
     backgroudWoker.RunWorkerCompleted        += new RunWorkerCompletedEventHandler(extractFileRunWorkerCompletedEventHandler);
     backgroudWoker.WorkerSupportsCancellation = true;
     backgroudWoker.RunWorkerAsync();
     waitForm.ShowDialog();
 }