From 121311b4accdca68e2d10360e255f513916b205e Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 26 Feb 2018 16:31:42 +0200 Subject: Working on Hardware Designer Module. Added Installer Project Installer. --- .../ViewModelLocator.cs | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs new file mode 100644 index 000000000..0f770c798 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModelLocator.cs @@ -0,0 +1,33 @@ +using GalaSoft.MvvmLight; +using GalaSoft.MvvmLight.Ioc; +using Microsoft.Practices.ServiceLocation; +using Tango.MachineStudio.HardwareDesigner.ViewModels; +using Tango.MachineStudio.HardwareDesigner.Views; + +namespace Tango.MachineStudio.HardwareDesigner +{ + /// + /// This class contains static references to all the view models in the + /// application and provides an entry point for the bindings. + /// + public static class ViewModelLocator + { + /// + /// Initializes a new instance of the ViewModelLocator class. + /// + static ViewModelLocator() + { + ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); + + SimpleIoc.Default.Register(); + } + + public static MainViewVM MainViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + } +} \ No newline at end of file -- cgit v1.3.1