Esempio n. 1
0
        private void start_scan_button_Click(object sender, EventArgs e)
        {
            //Store all the drive names

            /*string[] drives = System.Environment.GetLogicalDrives();
             *
             * foreach (string dr in drives)
             * {
             *  System.IO.DriveInfo di = new System.IO.DriveInfo(dr);
             *  MessageBox.Show(di.Name);
             *  // Check if drive is ready to be scanned
             *  if (!di.IsReady)
             *  {
             *      MessageBox.Show("The drive {0} could not be read", di.Name);
             *      continue;
             *  }
             * }*/

            System.IO.DirectoryInfo di = new DirectoryInfo(@"C:\Users\Laptop\Documents");
            status_bar.Value = 0;
            FileScanner.walk_directory_tree(di);
            int the_rest = status_bar.Maximum - status_bar.Value;

            status_bar.Increment(the_rest);
            MessageBox.Show("Scan Complete");
        }
Esempio n. 2
0
        private void file_scan_button_Click(object sender, EventArgs e)
        {
            string path; // Holds path to file given by the UI

            //Pull string from UI text box
            path = path_box.Text;
            // C:\Users\Laptop\Documents\CSGOHexValues.txt <- test file path
            // Search the file for key words
            if (FileScanner.keyword_search(path))
            {
                MessageBox.Show(path);
            }
            else
            {
                MessageBox.Show("Clean");
            }
        }