Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Muteo42 authored Jul 6, 2021
1 parent f8aebff commit c1b54a9
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 29 deletions.
2 changes: 1 addition & 1 deletion CleanerX/Main.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 26 additions & 28 deletions CleanerX/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,43 +342,41 @@ private void GraphUpdate()

private void metroButton1_Click(object sender, EventArgs e)
{
if (!backgroundWorker1.IsBusy)
Process[] process = Process.GetProcesses();
foreach (Process p in process) try { EmptyWorkingSet(p.Handle); } catch { }
DirectoryInfo directory = new DirectoryInfo(Path.GetTempPath());
foreach (FileInfo file in directory.GetFiles())
{
backgroundWorker1.RunWorkerAsync();
DirectoryInfo directory = new DirectoryInfo(Path.GetTempPath());
foreach (FileInfo file in directory.GetFiles())
try
{
try
{
file.Delete();
}
catch { }
file.Delete();
}
foreach (DirectoryInfo dir in directory.GetDirectories())
catch { }
}
foreach (DirectoryInfo dir in directory.GetDirectories())
{
try
{
try
{
dir.Delete(true);
}
catch { }
dir.Delete(true);
}
directory = new DirectoryInfo(Environment.GetEnvironmentVariable("TEMP", EnvironmentVariableTarget.Machine));
foreach (FileInfo file in directory.GetFiles())
catch { }
}
directory = new DirectoryInfo(Environment.GetEnvironmentVariable("TEMP", EnvironmentVariableTarget.Machine));
foreach (FileInfo file in directory.GetFiles())
{
try
{
try
{
file.Delete();
}
catch { }
file.Delete();
}
foreach (DirectoryInfo dir in directory.GetDirectories())
catch { }
}
foreach (DirectoryInfo dir in directory.GetDirectories())
{
try
{
try
{
dir.Delete(true);
}
catch { }
dir.Delete(true);
}
catch { }
}
metroButton1.Enabled = false;
}
Expand Down
Binary file modified CleanerX/bin/Release/CleanerX.exe
Binary file not shown.
Binary file modified CleanerX/bin/Release/CleanerX.pdb
Binary file not shown.

0 comments on commit c1b54a9

Please sign in to comment.