mirror of
https://github.com/sp-tarkov/launcher.git
synced 2025-02-13 08:30:44 -05:00
39 lines
998 B
C#
39 lines
998 B
C#
![]() |
using Aki.Launcher.Controllers;
|
||
|
using Aki.Launcher.ViewModels;
|
||
|
using Aki.Launcher.Views;
|
||
|
using Avalonia;
|
||
|
using Avalonia.Controls.ApplicationLifetimes;
|
||
|
using Avalonia.Markup.Xaml;
|
||
|
using ReactiveUI;
|
||
|
using System;
|
||
|
using System.Reactive;
|
||
|
|
||
|
namespace Aki.Launcher
|
||
|
{
|
||
|
public class App : Application
|
||
|
{
|
||
|
public override void Initialize()
|
||
|
{
|
||
|
AvaloniaXamlLoader.Load(this);
|
||
|
|
||
|
RxApp.DefaultExceptionHandler = Observer.Create<Exception>((exception) =>
|
||
|
{
|
||
|
LogManager.Instance.Exception(exception);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
public override void OnFrameworkInitializationCompleted()
|
||
|
{
|
||
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||
|
{
|
||
|
desktop.MainWindow = new MainWindow
|
||
|
{
|
||
|
DataContext = new MainWindowViewModel(),
|
||
|
};
|
||
|
}
|
||
|
|
||
|
base.OnFrameworkInitializationCompleted();
|
||
|
}
|
||
|
}
|
||
|
}
|