mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-04-05 01:29:38 -04:00
30 lines
826 B
C#
30 lines
826 B
C#
using Avalonia;
|
|
using Avalonia.Controls.ApplicationLifetimes;
|
|
using Avalonia.Markup.Xaml;
|
|
using Observatory.UI.ViewModels;
|
|
|
|
namespace Observatory.UI
|
|
{
|
|
public class MainApplication : Application
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
AvaloniaXamlLoader.Load(this);
|
|
}
|
|
|
|
public override void OnFrameworkInitializationCompleted()
|
|
{
|
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
|
{
|
|
var pluginManager = PluginManagement.PluginManager.GetInstance;
|
|
desktop.MainWindow = new Views.MainWindow()
|
|
{
|
|
DataContext = new MainWindowViewModel(pluginManager)
|
|
};
|
|
}
|
|
|
|
base.OnFrameworkInitializationCompleted();
|
|
}
|
|
}
|
|
}
|