-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
34 lines (29 loc) · 889 Bytes
/
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
global using System;
global using System.IO;
global using System.Linq;
global using System.Net.Http;
global using System.Threading;
global using System.Threading.Tasks;
using System.Runtime.InteropServices;
using Avalonia;
namespace FlaxPlugMan;
public class Program
{
public static string[] Args { get; private set;}
private static void Main(string[] args)
{
Args = args;
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
}
public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure<App>().UsePlatformDetect();
public static string GetOSCommand()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
return "explorer";
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
return "xdg-open";
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
return "open";
return null;
}
}