38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
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>();
|
|
}
|
|
}
|
|
}
|