diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-11-01 10:56:09 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-11-01 10:56:09 -0700 |
| commit | 69b15d96cebdbb7201b1849b4f62786633d70b8d (patch) | |
| tree | 4b65de8679e4b4ab81b69edcccbac1ae9f55a16d /src/WixToolset.Data/Tuples/RadioButtonTuple.cs | |
| parent | a8656a87887d6cb2c54f4bbeacee37f7074f1032 (diff) | |
| download | wix-69b15d96cebdbb7201b1849b4f62786633d70b8d.tar.gz wix-69b15d96cebdbb7201b1849b4f62786633d70b8d.tar.bz2 wix-69b15d96cebdbb7201b1849b4f62786633d70b8d.zip | |
Introduce WiX Intermediate Representation
Diffstat (limited to 'src/WixToolset.Data/Tuples/RadioButtonTuple.cs')
| -rw-r--r-- | src/WixToolset.Data/Tuples/RadioButtonTuple.cs | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Tuples/RadioButtonTuple.cs b/src/WixToolset.Data/Tuples/RadioButtonTuple.cs new file mode 100644 index 00000000..420577dc --- /dev/null +++ b/src/WixToolset.Data/Tuples/RadioButtonTuple.cs | |||
| @@ -0,0 +1,108 @@ | |||
| 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 RadioButton = new IntermediateTupleDefinition( | ||
| 10 | TupleDefinitionType.RadioButton, | ||
| 11 | new[] | ||
| 12 | { | ||
| 13 | new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Property), IntermediateFieldType.String), | ||
| 14 | new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Order), IntermediateFieldType.Number), | ||
| 15 | new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Value), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.X), IntermediateFieldType.Number), | ||
| 17 | new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Y), IntermediateFieldType.Number), | ||
| 18 | new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Width), IntermediateFieldType.Number), | ||
| 19 | new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Height), IntermediateFieldType.Number), | ||
| 20 | new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Text), IntermediateFieldType.String), | ||
| 21 | new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Help), IntermediateFieldType.String), | ||
| 22 | }, | ||
| 23 | typeof(RadioButtonTuple)); | ||
| 24 | } | ||
| 25 | } | ||
| 26 | |||
| 27 | namespace WixToolset.Data.Tuples | ||
| 28 | { | ||
| 29 | public enum RadioButtonTupleFields | ||
| 30 | { | ||
| 31 | Property, | ||
| 32 | Order, | ||
| 33 | Value, | ||
| 34 | X, | ||
| 35 | Y, | ||
| 36 | Width, | ||
| 37 | Height, | ||
| 38 | Text, | ||
| 39 | Help, | ||
| 40 | } | ||
| 41 | |||
| 42 | public class RadioButtonTuple : IntermediateTuple | ||
| 43 | { | ||
| 44 | public RadioButtonTuple() : base(TupleDefinitions.RadioButton, null, null) | ||
| 45 | { | ||
| 46 | } | ||
| 47 | |||
| 48 | public RadioButtonTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.RadioButton, sourceLineNumber, id) | ||
| 49 | { | ||
| 50 | } | ||
| 51 | |||
| 52 | public IntermediateField this[RadioButtonTupleFields index] => this.Fields[(int)index]; | ||
| 53 | |||
| 54 | public string Property | ||
| 55 | { | ||
| 56 | get => (string)this.Fields[(int)RadioButtonTupleFields.Property]?.Value; | ||
| 57 | set => this.Set((int)RadioButtonTupleFields.Property, value); | ||
| 58 | } | ||
| 59 | |||
| 60 | public int Order | ||
| 61 | { | ||
| 62 | get => (int)this.Fields[(int)RadioButtonTupleFields.Order]?.Value; | ||
| 63 | set => this.Set((int)RadioButtonTupleFields.Order, value); | ||
| 64 | } | ||
| 65 | |||
| 66 | public string Value | ||
| 67 | { | ||
| 68 | get => (string)this.Fields[(int)RadioButtonTupleFields.Value]?.Value; | ||
| 69 | set => this.Set((int)RadioButtonTupleFields.Value, value); | ||
| 70 | } | ||
| 71 | |||
| 72 | public int X | ||
| 73 | { | ||
| 74 | get => (int)this.Fields[(int)RadioButtonTupleFields.X]?.Value; | ||
| 75 | set => this.Set((int)RadioButtonTupleFields.X, value); | ||
| 76 | } | ||
| 77 | |||
| 78 | public int Y | ||
| 79 | { | ||
| 80 | get => (int)this.Fields[(int)RadioButtonTupleFields.Y]?.Value; | ||
| 81 | set => this.Set((int)RadioButtonTupleFields.Y, value); | ||
| 82 | } | ||
| 83 | |||
| 84 | public int Width | ||
| 85 | { | ||
| 86 | get => (int)this.Fields[(int)RadioButtonTupleFields.Width]?.Value; | ||
| 87 | set => this.Set((int)RadioButtonTupleFields.Width, value); | ||
| 88 | } | ||
| 89 | |||
| 90 | public int Height | ||
| 91 | { | ||
| 92 | get => (int)this.Fields[(int)RadioButtonTupleFields.Height]?.Value; | ||
| 93 | set => this.Set((int)RadioButtonTupleFields.Height, value); | ||
| 94 | } | ||
| 95 | |||
| 96 | public string Text | ||
| 97 | { | ||
| 98 | get => (string)this.Fields[(int)RadioButtonTupleFields.Text]?.Value; | ||
| 99 | set => this.Set((int)RadioButtonTupleFields.Text, value); | ||
| 100 | } | ||
| 101 | |||
| 102 | public string Help | ||
| 103 | { | ||
| 104 | get => (string)this.Fields[(int)RadioButtonTupleFields.Help]?.Value; | ||
| 105 | set => this.Set((int)RadioButtonTupleFields.Help, value); | ||
| 106 | } | ||
| 107 | } | ||
| 108 | } \ No newline at end of file | ||
