Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
- {
- Control.CheckForIllegalCrossThreadCalls = false;
- backgroundWorker2.Dispose();
- backgroundWorker3.Dispose();
- backgroundWorker1.WorkerSupportsCancellation = true;
- label6.Text = null;
- label7.Text = null;
- string filepath = label4.Text;
- string[] allfiles = Directory.GetFiles(filepath, "*.*", SearchOption.AllDirectories);
- string extensionstring = extensions.ToString();
- System.IO.File.WriteAllLines(@filepath+"\\testfiles.txt", allfiles);
- foreach(KeyValuePair<string, string> ext in extensions)
- {
- System.IO.File.WriteAllText(@filepath + "\\testext.txt", ext.ToString());
- foreach (string file in allfiles)
- {
- FileInfo fi = new FileInfo(file);
- label8.Text = Path.GetFileName(file);
- if (extensions.ContainsKey(fi.Extension))
- {
- files.Add(fi.FullName.ToString()); label8.Text = fi.FullName;
- System.IO.File.WriteAllText("@C:\test.txt",files.ToString());
- }
- }
- foreach (string GFI in files)
- {
- label7.Text = Path.GetDirectoryName(GFI);
- label8.Text = Path.GetFileName(GFI);
- label7.Text = "Directory";
- label8.Text = "File";
- }
- }
- this.pictureBox3.Image = null;
- Int32 filecount = files.Count;
- label7.Text = "Directories";
- this.pictureBox4.Image = Properties.Resources.music16;
- pictureBox5.Image = MusicLibUtility.Properties.Resources.scanning;
- this.pictureBox1.Image = Properties.Resources.skinitunes;
- label11.Text = "Preparing to scan for corupt media files";
- Thread.Sleep(2000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement