-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
25 lines (21 loc) · 847 Bytes
/
Copy pathProgram.cs
File metadata and controls
25 lines (21 loc) · 847 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
using System.Windows.Forms;
namespace NexKVM;
internal static class Program
{
[STAThread]
private static void Main(string[] args)
{
// Sets Per-Monitor-V2 DPI awareness (via ApplicationHighDpiMode) so screen metrics and
// absolute cursor coordinates are true pixels for both WinForms and the input engine.
ApplicationConfiguration.Initialize();
// Optional power-user auto-start: NexKVM.exe host <ip> | NexKVM.exe receiver
string? role = null, ip = null;
if (args.Length > 0)
{
string a = args[0].ToLowerInvariant();
if (a is "host" or "pc") { role = "host"; if (args.Length > 1) ip = args[1]; }
else if (a is "receiver" or "target" or "laptop") { role = "receiver"; }
}
Application.Run(new MainForm(role, ip));
}
}