aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs
blob: 94b2f43411ce0bfd26b91315dc3314a0d369c7c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc
using Tango.Core.DI;
using Tango.MachineStudio.Logging.Navigation;
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()
        {
            TangoIOC.Default.Register<EventsViewVM>();
            TangoIOC.Default.Register<ApplicationLogsViewVM>();
            TangoIOC.Default.Register<EmbeddedLogsViewVM>();
            TangoIOC.Default.Register<HomeViewVM>();

            TangoIOC.Default.Unregister<LoggingNavigationManager>();
            TangoIOC.Default.Register<LoggingNavigationManager>(new LoggingNavigationManager());
        }

        public static EventsViewVM EventsViewVM
        {
            get
            {
                return TangoIOC.Default.GetInstance<EventsViewVM>();
            }
        }

        public static ApplicationLogsViewVM ApplicationLogsViewVM
        {
            get
            {
                return TangoIOC.Default.GetInstance<ApplicationLogsViewVM>();
            }
        }

        public static EmbeddedLogsViewVM EmbeddedLogsViewVM
        {
            get
            {
                return TangoIOC.Default.GetInstance<EmbeddedLogsViewVM>();
            }
        }

        public static HomeViewVM HomeViewVM
        {
            get
            {
                return TangoIOC.Default.GetInstance<HomeViewVM>();
            }
        }
    }
}