aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/App.xaml
blob: 787e83d7273864b6cfe4858a6d9916f4f0032817 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<Application x:Class="Tango.MachineStudio.RML.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/Tango.MachineStudio.Common;component/Resources/MaterialDesign.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Tango.MachineStudio.Common;component/Themes/LightThemeColors.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>
ight .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;

namespace Tango.CodeGeneration
{
    /// <summary>
    /// Represents a property code object.
    /// </summary>
    /// <seealso cref="Tango.CodeGeneration.CodeObject" />
    public class Property : CodeObject
    {
        /// <summary>
        /// Gets or sets the property name.
        /// </summary>
        public String Name { get; set; }

        /// <summary>
        /// Gets or sets the property type.
        /// </summary>
        public String Type { get; set; }

        /// <summary>
        /// Gets or sets the property description.
        /// </summary>
        public String Description { get; set; }

        /// <summary>
        /// Gets or sets the property setter modifier.
        /// </summary>
        public CodeObjectModifier SetterModifier { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this property has a setter.
        /// </summary>
        public bool HasSetter { get; set; }

        /// <summary>
        /// Gets or sets the content of the setter.
        /// </summary>
        public String SetterContent { get; set; }

        /// <summary>
        /// Gets or sets the content of the getter.
        /// </summary>
        public String GetterContent { get; set; }

        /// <summary>
        /// Gets the private field.
        /// </summary>
        /// <returns></returns>
        public virtual String GetPrivateField()
        {
            return "_" + Name.ToLower();
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Property"/> class.
        /// </summary>
        public Property()
            : base()
        {
            Name = "MyProperty";
            Type = "int";
            SetterModifier = CodeObjectModifier.None;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Property"/> class.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="type">The type.</param>
        public Property(String name, String type)
            : this()
        {
            Name = name;
            Type = type;
        }
    }
}