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