forked from Forgot-Dream/STS-Bcut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.xaml.cs
37 lines (33 loc) · 1.05 KB
/
App.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using Prism.DryIoc;
using Prism.Ioc;
using System.Windows;
using Prism.Services.Dialogs;
using STS_Bcut.src;
using STS_Bcut.src.ViewModels;
using STS_Bcut.src.Views;
using STS_Bcut.src.Common;
namespace STS_Bcut
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : PrismApplication
{
protected override Window CreateShell()
{
return Container.Resolve<MainView>();
}
protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
containerRegistry.Register<IDialogHostService, DialogHostService>();
containerRegistry.RegisterForNavigation<AboutView,AboutViewModel>();
containerRegistry.RegisterForNavigation<SettingsView,SettingsViewModel>();
containerRegistry.RegisterForNavigation<MainView, MainViewModel>();
}
protected override void OnExit(ExitEventArgs e)
{
base.OnExit(e);
ConfigUtil.WriteConfig(MainViewModel.config);
}
}
}