28 lines
669 B
C#
Raw Normal View History

2023-05-11 23:11:39 -04:00
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using SPTInstaller.ViewModels;
using SPTInstaller.Views;
namespace SPTInstaller;
public partial class App : Application
2023-05-11 23:11:39 -04:00
{
public override void Initialize()
2023-05-11 23:11:39 -04:00
{
AvaloniaXamlLoader.Load(this);
}
2023-05-11 23:11:39 -04:00
public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
2023-05-11 23:11:39 -04:00
{
desktop.MainWindow = new MainWindow
2023-05-11 23:11:39 -04:00
{
DataContext = new MainWindowViewModel(),
};
2023-05-11 23:11:39 -04:00
}
base.OnFrameworkInitializationCompleted();
2023-05-11 23:11:39 -04:00
}
}