Skip to content
This repository was archived by the owner on Oct 5, 2019. It is now read-only.

Commit 248c57e

Browse files
author
Zaczero
committed
Added temp clean
Added select form icon
1 parent d152534 commit 248c57e

File tree

4 files changed

+637
-5
lines changed

4 files changed

+637
-5
lines changed

SharpLoader/MainForm.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ private void CompileClick(object sender, EventArgs e)
6868

6969
private void CloseClick(object sender, EventArgs e)
7070
{
71+
Program.CleanTemp();
7172
Application.Exit();
7273
}
7374
}

SharpLoader/Program.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ public static void Main(string[] args)
156156
Console.ReadKey();
157157
}
158158

159+
CleanTemp();
159160
Environment.Exit(compileResult);
160161
}
161162
}
@@ -448,7 +449,7 @@ public static void ProcessZip(string path)
448449
var zipBytes = File.ReadAllBytes(path);
449450
var zipHash = MD5.Create().ComputeHash(zipBytes);
450451

451-
var tempDir = Path.GetTempPath() + ByteArrayToString(zipHash);
452+
var tempDir = Path.GetTempPath() + @"SharpLoader\" + ByteArrayToString(zipHash);
452453

453454
if (Directory.Exists(tempDir))
454455
{
@@ -472,6 +473,15 @@ public static void ProcessZip(string path)
472473
}
473474
}
474475

476+
public static void CleanTemp()
477+
{
478+
var path = Path.GetTempPath() + "SharpLoader";
479+
if (Directory.Exists(path))
480+
{
481+
Directory.Delete(path, true);
482+
}
483+
}
484+
475485
private static IEnumerable<string> GetFilesFromDirectory(string directory)
476486
{
477487
var dir = new DirectoryInfo(directory);

SharpLoader/SelectForm.Designer.cs

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)