diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs index b3c16c2b4..94b2f4341 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs @@ -1,6 +1,4 @@ -using GalaSoft.MvvmLight; -using GalaSoft.MvvmLight.Ioc; -using Microsoft.Practices.ServiceLocation; +using Tango.Core.DI; using Tango.MachineStudio.Logging.Navigation; using Tango.MachineStudio.Logging.ViewModels; @@ -17,21 +15,20 @@ namespace Tango.MachineStudio.Logging /// </summary> static ViewModelLocator() { - ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); - SimpleIoc.Default.Register<EventsViewVM>(); - SimpleIoc.Default.Register<ApplicationLogsViewVM>(); - SimpleIoc.Default.Register<EmbeddedLogsViewVM>(); - SimpleIoc.Default.Register<HomeViewVM>(); + TangoIOC.Default.Register<EventsViewVM>(); + TangoIOC.Default.Register<ApplicationLogsViewVM>(); + TangoIOC.Default.Register<EmbeddedLogsViewVM>(); + TangoIOC.Default.Register<HomeViewVM>(); - SimpleIoc.Default.Unregister<LoggingNavigationManager>(); - SimpleIoc.Default.Register<LoggingNavigationManager>(() => new LoggingNavigationManager()); + TangoIOC.Default.Unregister<LoggingNavigationManager>(); + TangoIOC.Default.Register<LoggingNavigationManager>(new LoggingNavigationManager()); } public static EventsViewVM EventsViewVM { get { - return ServiceLocator.Current.GetInstance<EventsViewVM>(); + return TangoIOC.Default.GetInstance<EventsViewVM>(); } } @@ -39,7 +36,7 @@ namespace Tango.MachineStudio.Logging { get { - return ServiceLocator.Current.GetInstance<ApplicationLogsViewVM>(); + return TangoIOC.Default.GetInstance<ApplicationLogsViewVM>(); } } @@ -47,7 +44,7 @@ namespace Tango.MachineStudio.Logging { get { - return ServiceLocator.Current.GetInstance<EmbeddedLogsViewVM>(); + return TangoIOC.Default.GetInstance<EmbeddedLogsViewVM>(); } } @@ -55,7 +52,7 @@ namespace Tango.MachineStudio.Logging { get { - return ServiceLocator.Current.GetInstance<HomeViewVM>(); + return TangoIOC.Default.GetInstance<HomeViewVM>(); } } } |
