static void bw_DoWork(object sender, DoWorkEventArgs e) { AFHolder afh = (AFHolder)e.Argument; for (int n = 0; n < afh.FileNames.Length; n++) { afh.bw.ReportProgress(n + 1); AnalyzeFile(_CoreFolder, afh.FileNames[n], afh.OutputDir); } }
public static void AnalyzeFiles(string CoreFolder, string[] FileNames, string OutputDir) { _CoreFolder = CoreFolder; apb = new AnalyzerProgressBar(FileNames.Length); BackgroundWorker bw = new BackgroundWorker(); bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted); bw.DoWork += new DoWorkEventHandler(bw_DoWork); bw.ProgressChanged += new ProgressChangedEventHandler(bw_ProgressChanged); bw.WorkerReportsProgress = true; AFHolder afh = new AFHolder(FileNames, OutputDir); afh.bw = bw; bw.RunWorkerAsync(afh); apb.ShowDialog(); }
public static void AnalyzeFiles(string CoreFolder,string[] FileNames, string OutputDir) { _CoreFolder = CoreFolder; apb = new AnalyzerProgressBar(FileNames.Length); BackgroundWorker bw = new BackgroundWorker(); bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted); bw.DoWork += new DoWorkEventHandler(bw_DoWork); bw.ProgressChanged += new ProgressChangedEventHandler(bw_ProgressChanged); bw.WorkerReportsProgress = true; AFHolder afh = new AFHolder(FileNames, OutputDir); afh.bw = bw; bw.RunWorkerAsync(afh); apb.ShowDialog(); }