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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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>();
            }
        }
    }
}
="k">null, null) })); } #endregion } #region Messages public sealed partial class MidTankData : pb::IMessage<MidTankData> { private static readonly pb::MessageParser<MidTankData> _parser = new pb::MessageParser<MidTankData>(() => new MidTankData()); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<MidTankData> Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { get { return global::Tango.PMR.EmbeddedParameters.MidTankDataReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public MidTankData() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public MidTankData(MidTankData other) : this() { midTankId_ = other.midTankId_; initialOffsetA_ = other.initialOffsetA_; slopeB_ = other.slopeB_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public MidTankData Clone() { return new MidTankData(this); } /// <summary>Field number for the "MidTankId" field.</summary> public const int MidTankIdFieldNumber = 1; private uint midTankId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public uint MidTankId { get { return midTankId_; } set { midTankId_ = value; } } /// <summary>Field number for the "InitialOffsetA" field.</summary> public const int InitialOffsetAFieldNumber = 2; private double initialOffsetA_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double InitialOffsetA { get { return initialOffsetA_; } set { initialOffsetA_ = value; } } /// <summary>Field number for the "SlopeB" field.</summary> public const int SlopeBFieldNumber = 3; private double slopeB_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double SlopeB { get { return slopeB_; } set { slopeB_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as MidTankData); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Equals(MidTankData other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } if (MidTankId != other.MidTankId) return false; if (InitialOffsetA != other.InitialOffsetA) return false; if (SlopeB != other.SlopeB) return false; return true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (MidTankId != 0) hash ^= MidTankId.GetHashCode(); if (InitialOffsetA != 0D) hash ^= InitialOffsetA.GetHashCode(); if (SlopeB != 0D) hash ^= SlopeB.GetHashCode(); return hash; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { if (MidTankId != 0) { output.WriteRawTag(8); output.WriteUInt32(MidTankId); } if (InitialOffsetA != 0D) { output.WriteRawTag(17); output.WriteDouble(InitialOffsetA); } if (SlopeB != 0D) { output.WriteRawTag(25); output.WriteDouble(SlopeB); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; if (MidTankId != 0) { size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MidTankId); } if (InitialOffsetA != 0D) { size += 1 + 8; } if (SlopeB != 0D) { size += 1 + 8; } return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(MidTankData other) { if (other == null) { return; } if (other.MidTankId != 0) { MidTankId = other.MidTankId; } if (other.InitialOffsetA != 0D) { InitialOffsetA = other.InitialOffsetA; } if (other.SlopeB != 0D) { SlopeB = other.SlopeB; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: input.SkipLastField(); break; case 8: { MidTankId = input.ReadUInt32(); break; } case 17: { InitialOffsetA = input.ReadDouble(); break; } case 25: { SlopeB = input.ReadDouble(); break; } } } } } #endregion } #endregion Designer generated code