-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
53 lines (47 loc) · 1.45 KB
/
Program.cs
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
47
48
49
50
51
52
53
using StresserWinGUI.Helpers;
using StresserWinGUI.Forms;
namespace StresserWinGUI
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
///
public static HLogger hLogger = new HLogger();
public static string appWorkDir = Application.StartupPath;
[STAThread]
static void Main(string[] args)
{
Start(args);
}
public static void Start(string[] args)
{
//Prints a random ascii art
AsciiPrints.Random();
//Start the WINUI App Configurator
ApplicationConfiguration.Initialize();
//Set the working dir to the right dir!
Directory.SetCurrentDirectory(appWorkDir);
Environment.CurrentDirectory = appWorkDir;
hLogger.Log(LogType.Warning, "DEBUG Mode Started");
//Starts the APP
Application.Run(new FrmLogin());
}
public static void Stop()
{
Application.Exit();
}
public static void Crash(string message)
{
hLogger.Log(LogType.Error, "!FATAL CRASH!"+message);
Environment.Exit(0);
}
public static void Restart()
{
hLogger.Log(LogType.Warning, "Please wait while we restart the APP");
Application.Restart();
Environment.Exit(0);
}
}
}