Пример #1
0
 public void CleanSpaces()
 {
     try
     {
         string   FromPath = label1.Text + "\\" + LeftFiles.SelectedItem.ToString();
         FileInfo file1    = new FileInfo(FromPath);
         FilePars pars     = new FilePars();
         pars.CleanSpaces(FromPath);
     }
     catch { }
     LoadAll(label1.Text, LeftFiles, LeftDirs, label1);
     LoadAll(label2.Text, RightFiles, RightDirs, label2);
 }
Пример #2
0
 public void Processe()
 {
     try
     {
         string   FromPath = label1.Text + "\\" + LeftFiles.SelectedItem.ToString();
         string   DestPath = label1.Text + "\\" + "processed" + LeftFiles.SelectedItem.ToString();
         FileInfo file1    = new FileInfo(FromPath);
         FileInfo file2    = new FileInfo(DestPath);
         FilePars pars     = new FilePars();
         pars.CleanRows(FromPath, DestPath);
         if (checkDeleteProcesse.Checked)
         {
             file1.Delete();
         }
     }
     catch { }
     LoadAll(label1.Text, LeftFiles, LeftDirs, label1);
     LoadAll(label2.Text, RightFiles, RightDirs, label2);
 }
Пример #3
0
 public void FindFileRecurs(DirectoryInfo dir)
 {
     if (dir.GetDirectories().Length != 0)
     {
         foreach (DirectoryInfo crrDir in dir.GetDirectories())
         {
             if (crrDir.GetDirectories().Length != 0)
             {
                 FindFileRecurs(crrDir);
             }
             FileInfo[] files = crrDir.GetFiles();
             foreach (FileInfo crrFile in files)
             {
                 if (crrFile.Extension == ".html")
                 {
                     FilePars pars = new FilePars();
                     if (pars.SearchByWords(crrFile.FullName, SearchHtmlTxt.Text))
                     {
                         LeftFiles.Items.Add(crrFile.FullName);
                     }
                 }
             }
         }
     }
     FileInfo[] files1 = dir.GetFiles();
     foreach (FileInfo crrFile in files1)
     {
         if (crrFile.Extension == ".html")
         {
             FilePars pars = new FilePars();
             if (pars.SearchByWords(crrFile.FullName, SearchHtmlTxt.Text))
             {
                 LeftFiles.Items.Add(crrFile.FullName);
             }
         }
     }
 }