aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Tuples/ControlTuple.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Data/Tuples/ControlTuple.cs')
-rw-r--r--src/WixToolset.Data/Tuples/ControlTuple.cs132
1 files changed, 132 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Tuples/ControlTuple.cs b/src/WixToolset.Data/Tuples/ControlTuple.cs
new file mode 100644
index 00000000..82de917c
--- /dev/null
+++ b/src/WixToolset.Data/Tuples/ControlTuple.cs
@@ -0,0 +1,132 @@
1// 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.
2
3namespace WixToolset.Data
4{
5 using WixToolset.Data.Tuples;
6
7 public static partial class TupleDefinitions
8 {
9 public static readonly IntermediateTupleDefinition Control = new IntermediateTupleDefinition(
10 TupleDefinitionType.Control,
11 new[]
12 {
13 new IntermediateFieldDefinition(nameof(ControlTupleFields.Dialog_), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(ControlTupleFields.Control), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(ControlTupleFields.Type), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(ControlTupleFields.X), IntermediateFieldType.Number),
17 new IntermediateFieldDefinition(nameof(ControlTupleFields.Y), IntermediateFieldType.Number),
18 new IntermediateFieldDefinition(nameof(ControlTupleFields.Width), IntermediateFieldType.Number),
19 new IntermediateFieldDefinition(nameof(ControlTupleFields.Height), IntermediateFieldType.Number),
20 new IntermediateFieldDefinition(nameof(ControlTupleFields.Attributes), IntermediateFieldType.Number),
21 new IntermediateFieldDefinition(nameof(ControlTupleFields.Property), IntermediateFieldType.String),
22 new IntermediateFieldDefinition(nameof(ControlTupleFields.Text), IntermediateFieldType.String),
23 new IntermediateFieldDefinition(nameof(ControlTupleFields.Control_Next), IntermediateFieldType.String),
24 new IntermediateFieldDefinition(nameof(ControlTupleFields.Help), IntermediateFieldType.String),
25 },
26 typeof(ControlTuple));
27 }
28}
29
30namespace WixToolset.Data.Tuples
31{
32 public enum ControlTupleFields
33 {
34 Dialog_,
35 Control,
36 Type,
37 X,
38 Y,
39 Width,
40 Height,
41 Attributes,
42 Property,
43 Text,
44 Control_Next,
45 Help,
46 }
47
48 public class ControlTuple : IntermediateTuple
49 {
50 public ControlTuple() : base(TupleDefinitions.Control, null, null)
51 {
52 }
53
54 public ControlTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Control, sourceLineNumber, id)
55 {
56 }
57
58 public IntermediateField this[ControlTupleFields index] => this.Fields[(int)index];
59
60 public string Dialog_
61 {
62 get => (string)this.Fields[(int)ControlTupleFields.Dialog_]?.Value;
63 set => this.Set((int)ControlTupleFields.Dialog_, value);
64 }
65
66 public string Control
67 {
68 get => (string)this.Fields[(int)ControlTupleFields.Control]?.Value;
69 set => this.Set((int)ControlTupleFields.Control, value);
70 }
71
72 public string Type
73 {
74 get => (string)this.Fields[(int)ControlTupleFields.Type]?.Value;
75 set => this.Set((int)ControlTupleFields.Type, value);
76 }
77
78 public int X
79 {
80 get => (int)this.Fields[(int)ControlTupleFields.X]?.Value;
81 set => this.Set((int)ControlTupleFields.X, value);
82 }
83
84 public int Y
85 {
86 get => (int)this.Fields[(int)ControlTupleFields.Y]?.Value;
87 set => this.Set((int)ControlTupleFields.Y, value);
88 }
89
90 public int Width
91 {
92 get => (int)this.Fields[(int)ControlTupleFields.Width]?.Value;
93 set => this.Set((int)ControlTupleFields.Width, value);
94 }
95
96 public int Height
97 {
98 get => (int)this.Fields[(int)ControlTupleFields.Height]?.Value;
99 set => this.Set((int)ControlTupleFields.Height, value);
100 }
101
102 public int Attributes
103 {
104 get => (int)this.Fields[(int)ControlTupleFields.Attributes]?.Value;
105 set => this.Set((int)ControlTupleFields.Attributes, value);
106 }
107
108 public string Property
109 {
110 get => (string)this.Fields[(int)ControlTupleFields.Property]?.Value;
111 set => this.Set((int)ControlTupleFields.Property, value);
112 }
113
114 public string Text
115 {
116 get => (string)this.Fields[(int)ControlTupleFields.Text]?.Value;
117 set => this.Set((int)ControlTupleFields.Text, value);
118 }
119
120 public string Control_Next
121 {
122 get => (string)this.Fields[(int)ControlTupleFields.Control_Next]?.Value;
123 set => this.Set((int)ControlTupleFields.Control_Next, value);
124 }
125
126 public string Help
127 {
128 get => (string)this.Fields[(int)ControlTupleFields.Help]?.Value;
129 set => this.Set((int)ControlTupleFields.Help, value);
130 }
131 }
132} \ No newline at end of file