Files
RedBookPlayer/RedBookPlayer.GUI/Program.cs

30 lines
738 B
C#
Raw Normal View History

2021-06-29 21:00:34 -07:00
using System;
#if WindowsDebug
2021-06-06 21:55:05 -07:00
using System.Runtime.InteropServices;
#endif
using Avalonia;
2021-03-19 17:07:27 -03:00
using Avalonia.Logging.Serilog;
2021-08-05 21:05:20 -07:00
using Avalonia.ReactiveUI;
2021-03-19 17:07:27 -03:00
namespace RedBookPlayer.GUI
2021-03-19 17:07:27 -03:00
{
2021-06-06 20:28:36 +01:00
internal class Program
2021-03-19 17:07:27 -03:00
{
2021-06-29 21:00:34 -07:00
[STAThread]
2021-03-19 17:07:27 -03:00
public static void Main(string[] args)
{
#if WindowsDebug
2021-03-19 17:07:27 -03:00
AllocConsole();
#endif
2021-03-19 17:07:27 -03:00
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
}
#if WindowsDebug
2021-03-19 17:07:27 -03:00
[DllImport("kernel32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool AllocConsole();
#endif
2021-03-19 17:07:27 -03:00
2021-08-05 21:05:20 -07:00
public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure<App>().UseReactiveUI().UsePlatformDetect().LogToDebug();
2021-03-19 17:07:27 -03:00
}
2021-06-06 20:28:36 +01:00
}