diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-03-25 16:26:36 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-03-25 16:26:36 +0300 |
| commit | fa53cf658d60afbcfb0449eb525da5a847075aa9 (patch) | |
| tree | 31c96d3bab8a54ebbf04be6aab14371be45aa1bb /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs | |
| parent | 86197cd0ec87a6cc186e90f75d848adc6dfa2285 (diff) | |
| download | Tango-fa53cf658d60afbcfb0449eb525da5a847075aa9.tar.gz Tango-fa53cf658d60afbcfb0449eb525da5a847075aa9.zip | |
Working on logging module.
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 | 31 |
1 files changed, 31 insertions, 0 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 new file mode 100644 index 000000000..76c89000d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs @@ -0,0 +1,31 @@ +using GalaSoft.MvvmLight; +using GalaSoft.MvvmLight.Ioc; +using Microsoft.Practices.ServiceLocation; +using Tango.MachineStudio.Logging.ViewModels; + +namespace Tango.MachineStudio.Logging +{ + /// <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 |
