public void RunWorker(TArgument argument)
 {
     System.Windows.Forms.Application.DoEvents();
     using (var worker = new ProgressWorker <TArgument> {
         Action = action
     })
     {
         worker.RunWorkerAsync();
         worker.RunWorkerCompleted += worker_RunWorkerCompleted;
         ShowDialog();
     }
 }
示例#2
0
 public DownloadForm()
 {
     InitializeComponent();
     ProgressWorker.RunWorkerAsync();
 }