添加的登录界面,使用固定账号和密码测试登录逻辑成功
This commit is contained in:
37
WorkStation.Client/App.xaml.cs
Normal file
37
WorkStation.Client/App.xaml.cs
Normal file
@ -0,0 +1,37 @@
|
||||
using Prism.Ioc;
|
||||
using Prism.Services.Dialogs;
|
||||
using System.Windows;
|
||||
using WorkStation.Client.ViewModels.Dialogs;
|
||||
using WorkStation.Client.Views;
|
||||
using WorkStation.Client.Views.Dialogs;
|
||||
|
||||
namespace WorkStation.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App
|
||||
{
|
||||
protected override Window CreateShell()
|
||||
{
|
||||
return Container.Resolve<MainWindow>();
|
||||
}
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
var dialogService = Container.Resolve<IDialogService>();
|
||||
dialogService.ShowDialog("LoginView", result =>
|
||||
{
|
||||
if (result.Result == ButtonResult.OK)
|
||||
{
|
||||
base.OnInitialized();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
protected override void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
containerRegistry.RegisterDialog<LoginView, LoginViewModel>();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user