2024-05-21 20:15:19 +01:00
|
|
|
using SPT.Launcher.Controllers;
|
2023-03-03 19:25:33 +00:00
|
|
|
using Avalonia;
|
|
|
|
using Avalonia.ReactiveUI;
|
|
|
|
using ReactiveUI;
|
|
|
|
using Splat;
|
|
|
|
using System;
|
|
|
|
using System.Reflection;
|
|
|
|
|
2024-05-21 20:15:19 +01:00
|
|
|
namespace SPT.Launcher
|
2023-03-03 19:25:33 +00:00
|
|
|
{
|
|
|
|
internal class Program
|
|
|
|
{
|
|
|
|
// 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 void Main(string[] args)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
BuildAvaloniaApp()
|
|
|
|
.StartWithClassicDesktopLifetime(args);
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
LogManager.Instance.Exception(ex);
|
|
|
|
}
|
2023-07-28 10:01:20 +01:00
|
|
|
}
|
2023-03-03 19:25:33 +00:00
|
|
|
|
|
|
|
// Avalonia configuration, don't remove; also used by visual designer.
|
|
|
|
public static AppBuilder BuildAvaloniaApp()
|
|
|
|
{
|
|
|
|
Locator.CurrentMutable.RegisterViewsForViewModels(Assembly.GetExecutingAssembly());
|
|
|
|
|
|
|
|
return AppBuilder.Configure<App>()
|
|
|
|
.UseReactiveUI()
|
|
|
|
.UsePlatformDetect()
|
|
|
|
.LogToTrace()
|
|
|
|
.UseReactiveUI();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|