mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-12 15:04:36 +01:00
37 lines
918 B
C#
37 lines
918 B
C#
using Avalonia;
|
|
using Avalonia.Controls.ApplicationLifetimes;
|
|
using Avalonia.Markup.Xaml;
|
|
|
|
using ServerSelector.ViewModels;
|
|
using ServerSelector.Views;
|
|
|
|
namespace ServerSelector;
|
|
|
|
public partial class App : Application
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
AvaloniaXamlLoader.Load(this);
|
|
}
|
|
|
|
public override void OnFrameworkInitializationCompleted()
|
|
{
|
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
|
{
|
|
desktop.MainWindow = new MainWindow
|
|
{
|
|
DataContext = new MainViewModel()
|
|
};
|
|
}
|
|
else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewPlatform)
|
|
{
|
|
singleViewPlatform.MainView = new MainView
|
|
{
|
|
DataContext = new MainViewModel()
|
|
};
|
|
}
|
|
|
|
base.OnFrameworkInitializationCompleted();
|
|
}
|
|
}
|