main
cs 148 lines 4.7 KB
Raw
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
3 namespace WixToolset.Data.WindowsInstaller.Rows
4 {
5 using System.Diagnostics.CodeAnalysis;
6
7 /// <summary>
8 /// Specialization of a row for the Control table.
9 /// </summary>
10 public sealed class ControlRow : Row
11 {
12 /// <summary>
13 /// Creates a Control row that belongs to a table.
14 /// </summary>
15 /// <param name="sourceLineNumbers">Original source lines for this row.</param>
16 /// <param name="table">Table this Control row belongs to and should get its column definitions from.</param>
17 public ControlRow(SourceLineNumber sourceLineNumbers, Table table) :
18 base(sourceLineNumbers, table)
19 {
20 }
21
22 public ControlRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDefinition) :
23 base(sourceLineNumbers, tableDefinition)
24 {
25 }
26
27 /// <summary>
28 /// Gets or sets the dialog of the Control row.
29 /// </summary>
30 /// <value>Primary key of the Control row.</value>
31 public string Dialog
32 {
33 get { return (string)this.Fields[0].Data; }
34 set { this.Fields[0].Data = value; }
35 }
36
37 /// <summary>
38 /// Gets or sets the identifier for this Control row.
39 /// </summary>
40 /// <value>Identifier for this Control row.</value>
41 public string Control
42 {
43 get { return (string)this.Fields[1].Data; }
44 set { this.Fields[1].Data = value; }
45 }
46
47 /// <summary>
48 /// Gets or sets the type of the control.
49 /// </summary>
50 /// <value>Name of the control.</value>
51 [SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")]
52 public string Type
53 {
54 get { return (string)this.Fields[2].Data; }
55 set { this.Fields[2].Data = value; }
56 }
57
58 /// <summary>
59 /// Gets or sets the X location of the control.
60 /// </summary>
61 /// <value>X location of the control.</value>
62 public string X
63 {
64 get { return this.Fields[3].AsString(); }
65 set { this.Fields[3].Data = value; }
66 }
67
68 /// <summary>
69 /// Gets or sets the Y location of the control.
70 /// </summary>
71 /// <value>Y location of the control.</value>
72 public string Y
73 {
74 get { return this.Fields[4].AsString(); }
75 set { this.Fields[4].Data = value; }
76 }
77
78 /// <summary>
79 /// Gets or sets the width of the control.
80 /// </summary>
81 /// <value>Width of the control.</value>
82 public string Width
83 {
84 get { return this.Fields[5].AsString(); }
85 set { this.Fields[5].Data = value; }
86 }
87
88 /// <summary>
89 /// Gets or sets the height of the control.
90 /// </summary>
91 /// <value>Height of the control.</value>
92 public string Height
93 {
94 get { return this.Fields[6].AsString(); }
95 set { this.Fields[6].Data = value; }
96 }
97
98 /// <summary>
99 /// Gets or sets the attributes for the control.
100 /// </summary>
101 /// <value>Attributes for the control.</value>
102 public int Attributes
103 {
104 get { return (int)this.Fields[7].Data; }
105 set { this.Fields[7].Data = value; }
106 }
107
108 /// <summary>
109 /// Gets or sets the Property associated with the control.
110 /// </summary>
111 /// <value>Property associated with the control.</value>
112 public string Property
113 {
114 get { return (string)this.Fields[8].Data; }
115 set { this.Fields[8].Data = value; }
116 }
117
118 /// <summary>
119 /// Gets or sets the text of the control.
120 /// </summary>
121 /// <value>Text of the control.</value>
122 public string Text
123 {
124 get { return (string)this.Fields[9].Data; }
125 set { this.Fields[9].Data = value; }
126 }
127
128 /// <summary>
129 /// Gets or sets the next control.
130 /// </summary>
131 /// <value>Next control.</value>
132 public string Next
133 {
134 get { return (string)this.Fields[10].Data; }
135 set { this.Fields[10].Data = value; }
136 }
137
138 /// <summary>
139 /// Gets or sets the help for the control.
140 /// </summary>
141 /// <value>Help for the control.</value>
142 public string Help
143 {
144 get { return (string)this.Fields[11].Data; }
145 set { this.Fields[11].Data = value; }
146 }
147 }
148 }