mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Split common and GUI code into separate projects
This commit is contained in:
29
RedBookPlayer.GUI/Program.cs
Normal file
29
RedBookPlayer.GUI/Program.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
#if WindowsDebug
|
||||
using System.Runtime.InteropServices;
|
||||
#endif
|
||||
using Avalonia;
|
||||
using Avalonia.Logging.Serilog;
|
||||
|
||||
namespace RedBookPlayer.GUI
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
#if WindowsDebug
|
||||
AllocConsole();
|
||||
#endif
|
||||
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
|
||||
}
|
||||
|
||||
#if WindowsDebug
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
static extern bool AllocConsole();
|
||||
#endif
|
||||
|
||||
public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure<App>().UsePlatformDetect().LogToDebug();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user