aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Azure/Tango.AzureUtils.UI/ViewModelLocator.cs
blob: ef765f93a6b8fef7232d73a30097feca1ae528db (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.h
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.AzureUtils.UI.Managers;
using Tango.AzureUtils.UI.ViewModels;
using Tango.Core;
using Tango.Core.DI;

namespace Tango.AzureUtils.UI
{
    public static class ViewModelLocator
    {
        static ViewModelLocator()
        {
            ExtendedObject obj = new ExtendedObject();

            if (!obj.DesignMode)
            {
                TangoIOC.Default.Register<MainViewVM>();
                TangoIOC.Default.Register<EnvironmentUpgradeViewVM>();
                TangoIOC.Default.Register<EnvironmentCreationViewVM>();
                TangoIOC.Default.Register<EnvironmentRemovalViewVM>();
                TangoIOC.Default.Register<EnvironmentFirmwareUpgradeViewVM>();
                TangoIOC.Default.Register<EnvironmentLogStreamViewVM>();
                TangoIOC.Default.Register<EnvironmentRollbackViewVM>();

                TangoIOC.Default.Register<IStatusManager, DefaultStatusManager>();
            }
        }

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

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

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

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

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

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

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