Ejemplo n.º 1
0
 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);
         }
     }
 }
Ejemplo n.º 2
0
        public MonitorSearch(InfoSearch isearch)
        {
            this.isearch = isearch;

            thr = new Thread(Run);
            thr.Start();
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 public WorkCompare(InfoSearch isearch)
 {
     this.isearch = isearch;
 }