public void FindInDir(DirectoryInfo dir, string pattern, bool recursive) { foreach (FileInfo file in dir.GetFiles(pattern)) { InfoSearch iss = Copy(isearch); iss.FileName = file.FullName; iss.FileName_dir = file.DirectoryName; iss.FileName_brief = file.Name; qe_path.Add(iss); qe_path2.Enqueue(iss); ProjectSearchCompareFiles.Data.isearch.Add(iss); //Util.message(file.FullName); numFolder++; if (stop) { return; } } if (recursive) { foreach (DirectoryInfo subdir in dir.GetDirectories()) { if (stop) { return; } this.FindInDir(subdir, pattern, recursive); } } }
public MonitorSearch(InfoSearch isearch) { this.isearch = isearch; thr = new Thread(Run); thr.Start(); }
InfoSearch Copy(InfoSearch isearch) { InfoSearch iss = new InfoSearch(); iss.Filecompare = isearch.Filecompare; iss.FilecompareSize = isearch.FilecompareSize; iss.FlagSearchInSubFolders = isearch.FlagSearchInSubFolders; iss.Maskfile = isearch.Maskfile; iss.Foldersearch = isearch.Foldersearch; iss.Textsearchinfile = isearch.Textsearchinfile; //isearch.algorithm = checkBox_Bytes.Checked || checkBox_Hash.Checked; iss.MaxSizeSearch = isearch.MaxSizeSearch; return(iss); }
public WorkCompare(InfoSearch isearch) { this.isearch = isearch; }