aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Tuples/ControlTuple.cs
blob: 82de917cd42a5c6584e610bc3bd8f08095a30e87 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.

namespace WixToolset.Data
{
    using WixToolset.Data.Tuples;

    public static partial class TupleDefinitions
    {
        public static readonly IntermediateTupleDefinition Control = new IntermediateTupleDefinition(
            TupleDefinitionType.Control,
            new[]
            {
                new IntermediateFieldDefinition(nameof(ControlTupleFields.Dialog_), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ControlTupleFields.Control), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ControlTupleFields.Type), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ControlTupleFields.X), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(ControlTupleFields.Y), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(ControlTupleFields.Width), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(ControlTupleFields.Height), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(ControlTupleFields.Attributes), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(ControlTupleFields.Property), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ControlTupleFields.Text), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ControlTupleFields.Control_Next), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(ControlTupleFields.Help), IntermediateFieldType.String),
            },
            typeof(ControlTuple));
    }
}

namespace WixToolset.Data.Tuples
{
    public enum ControlTupleFields
    {
        Dialog_,
        Control,
        Type,
        X,
        Y,
        Width,
        Height,
        Attributes,
        Property,
        Text,
        Control_Next,
        Help,
    }

    public class ControlTuple : IntermediateTuple
    {
        public ControlTuple() : base(TupleDefinitions.Control, null, null)
        {
        }

        public ControlTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Control, sourceLineNumber, id)
        {
        }

        public IntermediateField this[ControlTupleFields index] => this.Fields[(int)index];

        public string Dialog_
        {
            get => (string)this.Fields[(int)ControlTupleFields.Dialog_]?.Value;
            set => this.Set((int)ControlTupleFields.Dialog_, value);
        }

        public string Control
        {
            get => (string)this.Fields[(int)ControlTupleFields.Control]?.Value;
            set => this.Set((int)ControlTupleFields.Control, value);
        }

        public string Type
        {
            get => (string)this.Fields[(int)ControlTupleFields.Type]?.Value;
            set => this.Set((int)ControlTupleFields.Type, value);
        }

        public int X
        {
            get => (int)this.Fields[(int)ControlTupleFields.X]?.Value;
            set => this.Set((int)ControlTupleFields.X, value);
        }

        public int Y
        {
            get => (int)this.Fields[(int)ControlTupleFields.Y]?.Value;
            set => this.Set((int)ControlTupleFields.Y, value);
        }

        public int Width
        {
            get => (int)this.Fields[(int)ControlTupleFields.Width]?.Value;
            set => this.Set((int)ControlTupleFields.Width, value);
        }

        public int Height
        {
            get => (int)this.Fields[(int)ControlTupleFields.Height]?.Value;
            set => this.Set((int)ControlTupleFields.Height, value);
        }

        public int Attributes
        {
            get => (int)this.Fields[(int)ControlTupleFields.Attributes]?.Value;
            set => this.Set((int)ControlTupleFields.Attributes, value);
        }

        public string Property
        {
            get => (string)this.Fields[(int)ControlTupleFields.Property]?.Value;
            set => this.Set((int)ControlTupleFields.Property, value);
        }

        public string Text
        {
            get => (string)this.Fields[(int)ControlTupleFields.Text]?.Value;
            set => this.Set((int)ControlTupleFields.Text, value);
        }

        public string Control_Next
        {
            get => (string)this.Fields[(int)ControlTupleFields.Control_Next]?.Value;
            set => this.Set((int)ControlTupleFields.Control_Next, value);
        }

        public string Help
        {
            get => (string)this.Fields[(int)ControlTupleFields.Help]?.Value;
            set => this.Set((int)ControlTupleFields.Help, value);
        }
    }
}