-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
35 lines (30 loc) · 974 Bytes
/
Program.cs
File metadata and controls
35 lines (30 loc) · 974 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
26
27
28
29
30
31
32
33
34
35
using System;
using System.Diagnostics;
using Avalonia;
using DesktopNotifications;
using Projektanker.Icons.Avalonia;
using Projektanker.Icons.Avalonia.FontAwesome;
namespace urlhandler;
internal class Program {
public static INotificationManager NotificationManager = null!;
private static void Main(string[] args) {
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
}
public static AppBuilder BuildAvaloniaApp() {
IconProvider.Current.Register<FontAwesomeIconProvider>();
if (
Environment.OSVersion.Platform == PlatformID.Win32NT
&& Environment.OSVersion.Version.Major >= 10
|| Environment.OSVersion.Platform == PlatformID.Unix
) {
return AppBuilder
.Configure<App>()
.UsePlatformDetect()
.SetupDesktopNotifications(out NotificationManager!)
.LogToTrace();
}
else {
return AppBuilder.Configure<App>().UsePlatformDetect().LogToTrace();
}
}
}