mirror of
https://gitee.com/chinware/atomui.git
synced 2024-11-29 18:38:16 +08:00
29 lines
744 B
C#
29 lines
744 B
C#
using AtomUI.Demo.Desktop.Views;
|
|
using Avalonia;
|
|
using Avalonia.Controls.ApplicationLifetimes;
|
|
using Avalonia.Markup.Xaml;
|
|
|
|
namespace AtomUI.Demo.Desktop;
|
|
|
|
public class App : Application
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
AvaloniaXamlLoader.Load(this);
|
|
}
|
|
|
|
public override void OnFrameworkInitializationCompleted()
|
|
{
|
|
switch (ApplicationLifetime)
|
|
{
|
|
case IClassicDesktopStyleApplicationLifetime desktop:
|
|
desktop.MainWindow = new MainWindow();
|
|
break;
|
|
case ISingleViewApplicationLifetime singleView:
|
|
singleView.MainView = new MainView();
|
|
break;
|
|
}
|
|
|
|
base.OnFrameworkInitializationCompleted();
|
|
}
|
|
} |