private void toolStripTextBox3_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         string[] allFiles = Directory.GetFiles(fullPath, "*.txt");
         int      count = 0, countFiles = 0, countTimes = 0;
         Form2    f = new BgWorker.Form2(allFiles.ToList(), 10);
         f.Show();
         foreach (var file in allFiles)
         {
             count       = SearchWord(toolStripTextBox3.Text, file);
             countTimes += count;
             if (count > 0)
             {
                 countFiles++;
             }
         }
         if (countTimes == 0)
         {
             MessageBox.Show("Not Found :(  ", "Not Found", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             MessageBox.Show(string.Format("Found {0} times in {1} Files ^_^ ", countTimes, countFiles), "Found", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
 }
        private void button13_Click(object sender, EventArgs e)
        {
            if (hid)
            {
                timer2.Start();
            }
            Ps2.Visible = false;

            DialogResult result = folderBrowserDialog1.ShowDialog();

            if (result == DialogResult.OK)
            {
                Ps2.Show();
                button2.Enabled     = true; button2.Visible = true;
                button3.Enabled     = true; button3.Visible = true;
                button5.Enabled     = true; button5.Visible = true;
                btnTreeView.Enabled = true; btnTreeView.Visible = true;
                path = folderBrowserDialog1.SelectedPath;

                try
                {
                    List <string> s = Directory.GetFiles(path, "*.*", SearchOption.AllDirectories).ToList();
                    Form2         f = new BgWorker.Form2(s);
                    f.Show();
                    Parallel.Invoke(() => { ListDirectory(treeView, path); }, () => { listView(path); });
                }
                catch
                {
                }
            }
        }
 private void decryptAllToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (Directory.Exists(fullPath))
     {
         string[] allFiles = Directory.GetFiles(fullPath, "*.txt");
         Form2    f        = new BgWorker.Form2(allFiles.ToList(), 500);
         f.Show();
         foreach (var file in allFiles)
         {
             fullPath = file;
             Decrypt(2);
         }
     }
     else
     {
         MessageBox.Show("working with Directory Only :) ", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }