aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs222
1 files changed, 222 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
new file mode 100644
index 000000000..48175ed17
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
@@ -0,0 +1,222 @@
+using GalaSoft.MvvmLight;
+using GalaSoft.MvvmLight.Ioc;
+using Microsoft.Practices.ServiceLocation;
+using Tango.MachineStudio.DB.ViewModels;
+
+namespace Tango.MachineStudio.DB
+{
+ /// <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>();
+ SimpleIoc.Default.Register<MachinesViewVM>();
+ SimpleIoc.Default.Register<OrganizationsViewVM>();
+ SimpleIoc.Default.Register<AddressesViewVM>();
+ SimpleIoc.Default.Register<UsersViewVM>();
+ SimpleIoc.Default.Register<RolesViewVM>();
+ SimpleIoc.Default.Register<PermissionsViewVM>();
+ SimpleIoc.Default.Register<MachineVersionsViewVM>();
+ SimpleIoc.Default.Register<ConfigurationsViewVM>();
+
+ SimpleIoc.Default.Register<ApplicationDisplayPanelVersionsViewVM>();
+ SimpleIoc.Default.Register<ApplicationFirmwareVersionsViewVM>();
+ SimpleIoc.Default.Register<ApplicationOsVersionsViewVM>();
+ SimpleIoc.Default.Register<ApplicationVersionsViewVM>();
+ SimpleIoc.Default.Register<EmbeddedFirmwareVersionsViewVM>();
+ SimpleIoc.Default.Register<EmbeddedSoftwareVersionsViewVM>();
+ SimpleIoc.Default.Register<HardwareVersionsViewVM>();
+
+ SimpleIoc.Default.Register<IdsPacksViewVM>();
+ SimpleIoc.Default.Register<DispensersViewVM>();
+ SimpleIoc.Default.Register<DispenserTypesViewVM>();
+ SimpleIoc.Default.Register<LiquidsViewVM>();
+ SimpleIoc.Default.Register<CartridgesViewVM>();
+ SimpleIoc.Default.Register<CartridgeTypesViewVM>();
+ }
+
+ public static MainViewVM MainViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<MainViewVM>();
+ }
+ }
+
+ public static MachinesViewVM MachinesViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<MachinesViewVM>();
+ }
+ }
+
+ public static OrganizationsViewVM OrganizationsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<OrganizationsViewVM>();
+ }
+ }
+
+ public static AddressesViewVM AddressesViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<AddressesViewVM>();
+ }
+ }
+
+ public static UsersViewVM UsersViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<UsersViewVM>();
+ }
+ }
+
+ public static RolesViewVM RolesViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<RolesViewVM>();
+ }
+ }
+
+ public static PermissionsViewVM PermissionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<PermissionsViewVM>();
+ }
+ }
+
+ public static MachineVersionsViewVM MachineVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<MachineVersionsViewVM>();
+ }
+ }
+
+ public static ConfigurationsViewVM ConfigurationsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<ConfigurationsViewVM>();
+ }
+ }
+
+ public static ApplicationDisplayPanelVersionsViewVM ApplicationDisplayPanelVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<ApplicationDisplayPanelVersionsViewVM>();
+ }
+ }
+
+ public static ApplicationFirmwareVersionsViewVM ApplicationFirmwareVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<ApplicationFirmwareVersionsViewVM>();
+ }
+ }
+
+ public static ApplicationOsVersionsViewVM ApplicationOsVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<ApplicationOsVersionsViewVM>();
+ }
+ }
+
+ public static ApplicationVersionsViewVM ApplicationVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<ApplicationVersionsViewVM>();
+ }
+ }
+
+ public static EmbeddedFirmwareVersionsViewVM EmbeddedFirmwareVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<EmbeddedFirmwareVersionsViewVM>();
+ }
+ }
+
+ public static EmbeddedSoftwareVersionsViewVM EmbeddedSoftwareVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<EmbeddedSoftwareVersionsViewVM>();
+ }
+ }
+
+ public static HardwareVersionsViewVM HardwareVersionsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<HardwareVersionsViewVM>();
+ }
+ }
+
+ public static IdsPacksViewVM IdsPacksViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<IdsPacksViewVM>();
+ }
+ }
+
+ public static DispensersViewVM DispensersViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<DispensersViewVM>();
+ }
+ }
+
+ public static DispenserTypesViewVM DispenserTypesViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<DispenserTypesViewVM>();
+ }
+ }
+
+ public static LiquidsViewVM LiquidsViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<LiquidsViewVM>();
+ }
+ }
+
+ public static CartridgesViewVM CartridgesViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<CartridgesViewVM>();
+ }
+ }
+
+ public static CartridgeTypesViewVM CartridgeTypesViewVM
+ {
+ get
+ {
+ return ServiceLocator.Current.GetInstance<CartridgeTypesViewVM>();
+ }
+ }
+ }
+} \ No newline at end of file