aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.CodeGeneration/Templates/ObservablesContextCodeFile.cshtml
blob: 4af5458d97860f05387063591f0efb240122f020 (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
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Tango Observables Generator
// 
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. Do not modify!
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Settings;
using Tango.BL.Entities;

namespace Tango.BL
{
    public partial class ObservablesContext : DbContext
    {
        @foreach (var prop in Model.Properties)
        {
            <div>
                /// <summary>
                /// Gets or sets the @(prop.Name).
                /// </summary>
                public @(prop.Type) @(prop.Name) { get; set; }
            </div>
        }
    }
}
ing.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Tango.Core.Commands;
using Tango.MachineStudio.Common;
using Tango.MachineStudio.Common.Notifications;
using Tango.MachineStudio.Common.StudioApplication;
using Tango.PMR;
using Tango.Scripting;
using Tango.Settings;
using Tango.SharedUI;
using Tango.Stubs;
using Tango.Stubs.ViewModels;
using Tango.Transport;
using Tango.Transport.Adapters;

namespace Tango.MachineStudio.Stubs.ViewModels
{
    /// <summary>
    /// Represents the script execution module main view model.
    /// </summary>
    /// <seealso cref="Tango.SharedUI.ViewModel" />
    public class MainViewVM : StudioViewModel
    {
        private INotificationProvider _notification;

        #region Properties

        public IStudioApplicationManager ApplicationManager { get; set; }

        private StubsViewVM _stubsViewVM;
        /// <summary>
        /// Gets or sets the stubs view vm.
        /// </summary>
        public StubsViewVM StubsViewVM
        {
            get { return _stubsViewVM; }
            set { _stubsViewVM = value; RaisePropertyChangedAuto(); }
        }

        #endregion

        #region Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="MainViewVM"/> class.
        /// </summary>
        public MainViewVM(IStudioApplicationManager applicationManager, INotificationProvider notification)
        {
            StubsViewVM = new StubsViewVM(ConnectionMode.External);

            ApplicationManager = applicationManager;
            _notification = notification;

            StubsViewVM.Bind(nameof(StubsViewVM.MachineOperator), ApplicationManager, nameof(ApplicationManager.ConnectedMachine));
        }

        #endregion

        #region Studio View Model

        /// <summary>
        /// Called when [shutdown request].
        /// </summary>
        /// <returns></returns>
        public override void OnShuttingDown()
        {
            StubsViewVM.SaveSettings();
        }

        public override void OnApplicationReady()
        {
            
        }

        #endregion
    }
}