-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProgram.cs
43 lines (37 loc) · 1.42 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
using Antumbra.Glow.Controller;
using Antumbra.Glow.Observer.Logging;
using System;
using System.Windows.Forms;
namespace Antumbra.Glow {
internal static class Program {
#region Private Methods
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
private static void Main() {
LoggerHelper.Logger logger = LoggerHelper.GetInstance();
logger.NewLogMsgAvail("Program Class", "Starting...");
if(Environment.OSVersion.Version.Major >= 6)
SetProcessDPIAware();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
logger.NewLogMsgAvail("Program Class", "Starting initialization of objects...");
ToolbarIconController controller = new ToolbarIconController();
try {
if(!controller.failed) {
logger.NewLogMsgAvail("Program Class", "Starting run...");
Application.Run();//start independent of form
}
} finally {
if(controller != null) {
controller.Dispose();
}
Application.Exit();
}
}
[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern bool SetProcessDPIAware();
#endregion Private Methods
}
}