aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-04-22 13:35:22 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-04-22 13:35:22 +0300
commitde099bd3b50b8ea52b212b8d322626582c2648be (patch)
treeeea98a7f7b073d6cf8ded47bddc3b3f3f5e7c430 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs
parent8edd1a95962a5c1c2e73d15f209a9fb362ff884a (diff)
downloadTango-de099bd3b50b8ea52b212b8d322626582c2648be.tar.gz
Tango-de099bd3b50b8ea52b212b8d322626582c2648be.zip
Implemented new TangoIOC container & TangoMessenger.
Got rid of MVVMLite libs ! Got rid of IShutdownRequestBlocker, IShutdownListener, IModuleRequestListener. Implemented IStudioViewModel & StudioViewModel.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs22
1 files changed, 9 insertions, 13 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs
index 077b30663..5921a2f15 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModelLocator.cs
@@ -1,6 +1,4 @@
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Ioc;
-using Microsoft.Practices.ServiceLocation;
+using Tango.Core.DI;
using Tango.MachineStudio.Technician.Navigation;
using Tango.MachineStudio.Technician.ViewModels;
@@ -17,22 +15,20 @@ namespace Tango.MachineStudio.Technician
/// </summary>
static ViewModelLocator()
{
- ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
+ TangoIOC.Default.Register<MainViewVM>();
+ TangoIOC.Default.Register<SensorsViewVM>();
+ TangoIOC.Default.Register<MachineTechViewVM>();
- SimpleIoc.Default.Register<MainViewVM>();
- SimpleIoc.Default.Register<SensorsViewVM>();
- SimpleIoc.Default.Register<MachineTechViewVM>();
+ TangoIOC.Default.Unregister<TechNavigationManager>();
- SimpleIoc.Default.Unregister<TechNavigationManager>();
-
- SimpleIoc.Default.Register<TechNavigationManager, TechNavigationManager>();
+ TangoIOC.Default.Register<TechNavigationManager, TechNavigationManager>();
}
public static MainViewVM MainViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<MainViewVM>();
+ return TangoIOC.Default.GetInstance<MainViewVM>();
}
}
@@ -40,7 +36,7 @@ namespace Tango.MachineStudio.Technician
{
get
{
- return ServiceLocator.Current.GetInstance<SensorsViewVM>();
+ return TangoIOC.Default.GetInstance<SensorsViewVM>();
}
}
@@ -48,7 +44,7 @@ namespace Tango.MachineStudio.Technician
{
get
{
- return ServiceLocator.Current.GetInstance<MachineTechViewVM>();
+ return TangoIOC.Default.GetInstance<MachineTechViewVM>();
}
}
}