aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Stubs/ViewModelLocator.cs
blob: 5034a4d906bfb7121f5a3de0bf5a36dd29a291f4 (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
using Tango.Core.DI;
using Tango.MachineStudio.Stubs.ViewModels;

namespace Tango.MachineStudio.Stubs
{
    /// <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<MainViewVM>();
        }

        public static MainViewVM MainViewVM
        {
            get
            {
                return TangoIOC.Default.GetInstance<MainViewVM>();
            }
        }
    }
}
> [StudioModule(1)] public class TechnicianModule : StudioModuleBase { /// <summary> /// Gets the module name. /// </summary> public override string Name => "Tech Board"; /// <summary> /// Gets the module description. /// </summary> public override string Description => "Provides access to low level machine components by exposing diagnostics and profiling tools."; /// <summary> /// Gets the module cover image. /// </summary> public override BitmapSource Image => ResourceHelper.GetImageFromResources("Images/technician.jpg"); /// <summary> /// Gets the module entry point view type. /// </summary> public override Type MainViewType { get { return typeof(MachineTechView); } } /// <summary> /// Gets the permission required to see and load this module. /// </summary> public override Permissions Permission => Permissions.RunTechBoardModule; /// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public override void Dispose() { } } }