refactor: simplify MainApp for .NET 8 DPI handling

DPI awareness is now handled by the ApplicationHighDpiMode project property.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 13:31:19 -05:00
parent 848023a2b9
commit e6e87b7cad

View File

@@ -1,5 +1,4 @@
using System;
using System.Runtime.InteropServices;
using System;
using System.Windows.Forms;
using OpenNest.Forms;
@@ -7,21 +6,12 @@ namespace OpenNest
{
internal static class MainApp
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
private static void Main()
{
if (Environment.OSVersion.Version.Major >= 6)
SetProcessDPIAware();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
[DllImport("user32.dll")]
private static extern bool SetProcessDPIAware();
}
}