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(); } }
public DownloadForm() { InitializeComponent(); ProgressWorker.RunWorkerAsync(); }