-
Notifications
You must be signed in to change notification settings - Fork 0
/
BootStrapper.cs
89 lines (81 loc) · 3.04 KB
/
BootStrapper.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
using Prism.Unity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using UI.Code.Controls;
using UI.Code.View;
using UI.Code.View.Dialog;
using UI.Code.View.Navigation;
using UI.Code.ViewModel;
namespace UI.Code
{
[Obsolete]
public class BootStrapper : UnityBootstrapper
{
#region Overridden Methods
/// <summary>
/// Entry point to the application
/// </summary>
/// <param name="runWithDefaultConfiguration"></param>
public override void Run(bool runWithDefaultConfiguration)
{
base.Run(runWithDefaultConfiguration);
}
/// <summary>
/// Initializes shell.xaml
/// </summary>
/// <returns></returns>
protected override DependencyObject CreateShell()
{
return Container.TryResolve<Shell>();
}
protected override void ConfigureContainer()
{
base.ConfigureContainer();
Container.RegisterTypeForNavigation<ShellViewModel,Shell>("Shell");
Container.RegisterTypeForNavigation<LoginPageView>("Login");
Container.RegisterTypeForNavigation<UserPageView>("Users");
Container.RegisterTypeForNavigation<ProjectsPageView>("Projects");
Container.RegisterTypeForNavigation<AdminNavigation>("AdminNav");
Container.RegisterTypeForNavigation<ProjectDetailPageView>("ProjectDetail");
Container.RegisterTypeForNavigation<ReportView>("Report");
Container.RegisterTypeForNavigation<LocationDetail>("LocationDetail");
Container.RegisterTypeForNavigation<DummyView>("DummyView");
// Container.RegisterDialog<NotificationDialog, NotificationDialogViewModel>();
}
/// <summary>
/// loads the Shell.xaml
/// </summary>
protected override void InitializeShell()
{
//var login = new LoginWindow();
//var loginVM = new LoginPageViewModel();
//loginVM.LoginCompleted += (sender, args) =>
//{
// Application.Current.MainWindow.Show();
// login.Close();
//};
//login.DataContext = loginVM;
//login.ShowDialog();
//App.Current.MainWindow = (Window)Shell;
App.Current.MainWindow.Show();
}
/// <summary>
/// Add view(module) from other assemblies and begins with modularity
/// </summary>
protected override void ConfigureModuleCatalog()
{
base.ConfigureModuleCatalog();
Type ModuleLocatorType = typeof(Presentation.ModuleLocators);
ModuleCatalog.AddModule(new Prism.Modularity.ModuleInfo
{
ModuleName = ModuleLocatorType.Name,
ModuleType = ModuleLocatorType.AssemblyQualifiedName
});
}
#endregion
}
}