private void doAnalysisBackground(object sender, DoWorkEventArgs e) { var worker = sender as BackgroundWorker; bool canceled = false; for (_currentAnalysisindexPath = 0; _currentAnalysisindexPath < Analyser.Config.Paths.Count(); _currentAnalysisindexPath++) { var di = new DirectoryInfo(Analyser.Config.Paths[_currentAnalysisindexPath]); //find files sizes canceled = Analyser.AnalyseFolder(di, false, worker, e, true); if (canceled) { return; } } Analyser.Stats.DeletedFiles = Analyser.Dset.Tables[0].Select("status=0").Length; Analyser.Stats.NewFiles = Analyser.Dset.Tables[0].Select("status=" + ((int)Analyser.status.New)).Length; //find files with same size and get hash if (Analyser.Config.Duplicate) { Analyser.AnalyseFileSet(worker, e); } canceled = e.Cancel; worker.ReportProgress(0, new WaitingFormProperties(Resources.Languages.Resources.Txt_Analyse_des_résultats)); EndAnalyse(canceled); }