Dispenser/DispenserUI/Views/Windows/SplashWindow.axaml.cs

30 lines
616 B
C#

using System.Threading.Tasks;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using DispenserUI.ViewModels;
namespace DispenserUI.Views.Windows;
public partial class SplashWindow : Window
{
public SplashWindow()
{
DataContext = ViewModel;
InitializeComponent();
}
public SplashVM ViewModel { get; } = App.GetService<SplashVM>();
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
/// <summary>
/// 进行系统初始化工作
/// </summary>
public async Task Init()
{
await ViewModel.Init(this);
}
}