E
emr
Hi, here is my application deletes temporary files. Sometimes it takes too
much time to delete, how can i pause and resume the application pressing a
button. i don't want to suspend and resume a thread if there is an other
way. Thank you.
Thread thread2=new Thread(new ThreadStart(deltmpfiles));
thread2.Start();
FileStream fs= new FileStream(Directory.GetCurrentDirectory() +
"\\tempfilelist.dat",FileMode.Open);
StreamReader reader= new StreamReader(fs);
while(reader.Peek() != -1)
{
DirSearch(systemdrive + "\\",reader.ReadLine());
}
progressBar1.PerformStep();
much time to delete, how can i pause and resume the application pressing a
button. i don't want to suspend and resume a thread if there is an other
way. Thank you.
Thread thread2=new Thread(new ThreadStart(deltmpfiles));
thread2.Start();
FileStream fs= new FileStream(Directory.GetCurrentDirectory() +
"\\tempfilelist.dat",FileMode.Open);
StreamReader reader= new StreamReader(fs);
while(reader.Peek() != -1)
{
DirSearch(systemdrive + "\\",reader.ReadLine());
}
progressBar1.PerformStep();