-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
46 lines (37 loc) · 973 Bytes
/
Program.cs
File metadata and controls
46 lines (37 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using FileCleaner.Games;
namespace FileCleaner;
class Program
{
private static readonly Base[] SupportedGames =
[
new IW6(),
new S1(),
new IW7(),
new H1()
];
private static Base? DetectGame()
{
string root = AppDomain.CurrentDomain.BaseDirectory;
foreach (var game in SupportedGames)
{
if (game.GAME_EXECUTABLES.Any(exe => File.Exists(Path.Combine(root, exe))))
{
return game;
}
}
return null;
}
static async Task Main(string[] args)
{
Console.Title = "File Cleaner";
Console.WriteLine("Detecting Game...");
var game = DetectGame();
if (game == null)
{
Console.WriteLine("No Supported Game Found!\nMake sure you put the exe in the correct game folder");
Console.ReadKey();
return;
}
await game.Process();
}
}