aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModelLocator.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-01-03 15:11:49 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-01-03 15:11:49 +0200
commit0fc95107f2da4f93f7c135e7c29802bd7d785431 (patch)
tree11f6c6e961a30ad942edf38dc6aebee501fed34a /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModelLocator.cs
parent63b2a192ba12f8239668b6818db4ad02db68dbbc (diff)
downloadTango-0fc95107f2da4f93f7c135e7c29802bd7d785431.tar.gz
Tango-0fc95107f2da4f93f7c135e7c29802bd7d785431.zip
Added Mid Tanks to DB.
Started implementing Machine Designer.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModelLocator.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModelLocator.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModelLocator.cs
new file mode 100644
index 000000000..66018e09c
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModelLocator.cs
@@ -0,0 +1,31 @@
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Ioc;
+using Microsoft.Practices.ServiceLocation;
+using Tango.MachineStudio.MachineDesigner.ViewModels;
+
+namespace Tango.MachineStudio.MachineDesigner
+{
+ /// <summary>
+ /// This class contains static references to all the view models in the
+ /// application and provides an entry point for the bindings.
+ /// </summary>
+ public static class ViewModelLocator
+ {
+ /// <summary>
+ /// Initializes a new instance of the ViewModelLocator class.
+ /// </summary>
+ static ViewModelLocator()
+ {
+ ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
+ SimpleIoc.Default.Register<MainViewVM>();
+ }
+
+ public static MainViewVM MainViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<MainViewVM>();
+ }
+ }
+ }
+} \ No newline at end of file