-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.cs
41 lines (31 loc) · 2.83 KB
/
Main.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
using BSS.Logging;
using System;
using System.IO;
using System.Reflection;
namespace Stimulator
{
internal static class Entry
{
[STAThread]
private static void Main()
{
Console.WriteLine("\n ██████╗ ███████╗ ███████╗████████╗██╗███╗ ███╗██╗ ██╗██╗ █████╗ ████████╗ ██████╗ ██████╗ \r\n██╔═══██╗██╔════╝ ██╔════╝╚══██╔══╝██║████╗ ████║██║ ██║██║ ██╔══██╗╚══██╔══╝██╔═══██╗██╔══██╗ \r\n██║ ██║███████╗ ███████╗ ██║ ██║██╔████╔██║██║ ██║██║ ███████║ ██║ ██║ ██║██████╔╝ \r\n██║ ██║╚════██║ ╚════██║ ██║ ██║██║╚██╔╝██║██║ ██║██║ ██╔══██║ ██║ ██║ ██║██╔══██╗ \r\n╚██████╔╝███████║ ███████║ ██║ ██║██║ ╚═╝ ██║╚██████╔╝███████╗██║ ██║ ██║ ╚██████╔╝██║ ██║ \r\n ╚═════╝ ╚══════╝ ╚══════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ \r\n ");
RunContextInfo.ExecutablePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
Log.Initialize(new(RunContextInfo.ExecutablePath, Log.Options.DEFAULT_PADDING_WIDTH, Log.Options.TIME_FORMAT, Log.Options.FILENAME_FORMAT, true));
App app = new();
UI.Dispatcher = app.Dispatcher;
try
{
app.InitializeComponent();
Log.FastLog("Starting MainWindow", LogSeverity.Info, "Main()");
app.Run();
}
catch (Exception exception)
{
Log.FastLog($"An unhandled exception was thrown: {exception.Message}\n" + exception.StackTrace, LogSeverity.Critical, "Main()");
}
Log.FastLog("MainWindow closed, press return to exit:", LogSeverity.Info, "Main()");
Console.ReadLine();
}
}
}