aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.CodeGeneration/Templates/EnumerationFileJava.cshtml
blob: 43560820408ad2328f274278f5523b408ec1cebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.twine.tango.dal.enumerations;

import com.twine.tango.core.DescriptionAnnotation;

public enum @(Model.Name)
{
    @foreach (var prop in Model.Fields)
    {
        <div>
            @@DescriptionAnnotation(description = "@(prop.Description)")
            @(prop.Name)(@(prop.Value)),

        </div>
    }
    ;

    private int value;

    @(Model.Name)(int value)
    {
        this.value = value;
    }
}
und-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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Core;

namespace Tango.MachineStudio.MachineDesigner.Models
{
    /// <summary>
    /// Represents a hardware version collection.
    /// </summary>
    /// <seealso cref="Tango.Core.ExtendedObject" />
    /// <seealso cref="Tango.MachineStudio.MachineDesigner.Models.IHasDifference" />
    public class HardwareCollection : ExtendedObject, IHasDifference
    {
        /// <summary>
        /// Gets or sets the name of the collection.
        /// </summary>
        public String CollectionName { get; set; }

        /// <summary>
        /// Gets or sets the components.
        /// </summary>
        public SynchronizedObservableCollection<HardwareComponent> Components { get; set; }

        /// <summary>
        /// Gets a value indicating whether this instance has differences.
        /// </summary>
        public bool HasDifferences
        {
            get
            {
                return Components.Any(item => item.HasDifferences);
            }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="HardwareCollection"/> class.
        /// </summary>
        public HardwareCollection()
        {
            Components = new SynchronizedObservableCollection<HardwareComponent>();
        }
    }
}