diff options
| author | Roy <Roy.mail.net@gmail.com> | 2023-02-26 14:09:42 +0200 |
|---|---|---|
| committer | Roy <Roy.mail.net@gmail.com> | 2023-02-26 14:09:42 +0200 |
| commit | c256fc124a867707c787074c9076227341766794 (patch) | |
| tree | b3105881412a06219a6f0e0d9af7dd0e662bf4e8 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs | |
| parent | 795f3ab6ea36551281ec6442aa16b9547af96adc (diff) | |
| download | Tango-c256fc124a867707c787074c9076227341766794.tar.gz Tango-c256fc124a867707c787074c9076227341766794.zip | |
eureka_ppc
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs index ab7547dad..63e58d58a 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs @@ -8,6 +8,7 @@ using Tango.PPC.Common.Application; using Tango.PPC.Common.Authentication; using Tango.PPC.Common.BackupRestore; using Tango.PPC.Common.Bit; +using Tango.PPC.Common.Build; using Tango.PPC.Common.Connection; using Tango.PPC.Common.Connectivity; using Tango.PPC.Common.Console; @@ -71,6 +72,8 @@ namespace Tango.PPC.UI /// </summary> static ViewModelLocator() { + var buildProvider = TangoIOC.Default.GetInstance<IBuildProvider>(); + TangoIOC.Default.Unregister<IDispatcherProvider>(); TangoIOC.Default.Unregister<INotificationProvider>(); TangoIOC.Default.Unregister<IAuthenticationProvider>(); @@ -178,7 +181,17 @@ namespace Tango.PPC.UI TangoIOC.Default.GetInstance<IPPCApplicationManager>().ContentRendered += (_, __) => { - TangoIOC.Default.Register<ILayoutView, LayoutView>(LayoutView.Instance); + if (buildProvider.IsEureka) + { + TangoIOC.Default.Register<IMainView, MainEurekaView>(MainEurekaView.Instance); + TangoIOC.Default.Register<ILayoutView, LayoutEurekaView>(LayoutEurekaView.Instance); + } + else + { + TangoIOC.Default.Register<IMainView, MainView>(MainView.Instance); + TangoIOC.Default.Register<ILayoutView, LayoutView>(LayoutView.Instance); + } + TangoIOC.Default.Register<IMachineSetupView, MachineSetupView>(MachineSetupView.Instance); TangoIOC.Default.Register<IMachineUpdateView, MachineUpdateView>(MachineUpdateView.Instance); }; |
