From cf6f87bea88df3f90e33dfdc5bb16f47b8716054 Mon Sep 17 00:00:00 2001 From: "Emma@Rory&" Date: Mon, 24 Jul 2023 20:57:23 +0200 Subject: Start of MRU Desktop --- MatrixRoomUtils.Desktop/Program.cs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 MatrixRoomUtils.Desktop/Program.cs (limited to 'MatrixRoomUtils.Desktop/Program.cs') diff --git a/MatrixRoomUtils.Desktop/Program.cs b/MatrixRoomUtils.Desktop/Program.cs new file mode 100644 index 0000000..74ab579 --- /dev/null +++ b/MatrixRoomUtils.Desktop/Program.cs @@ -0,0 +1,31 @@ +using Avalonia; +using Microsoft.Extensions.Hosting; +using Tmds.DBus.Protocol; + +namespace MatrixRoomUtils.Desktop; + +internal class Program { + private static IHost appHost; + // Initialization code. Don't use any Avalonia, third-party APIs or any + // SynchronizationContext-reliant code before AppMain is called: things aren't initialized + // yet and stuff might break. + [STAThread] + public static async Task Main(string[] args) { + try { + BuildAvaloniaApp() + .StartWithClassicDesktopLifetime(args); + } + catch (DBusException e) { } + catch (Exception e) { + Console.WriteLine(e); + throw; + } + } + + // Avalonia configuration, don't remove; also used by visual designer. + public static AppBuilder BuildAvaloniaApp() + => AppBuilder.Configure() + .UsePlatformDetect() + .WithInterFont() + .LogToTrace(); +} -- cgit 1.5.1