diff options
Diffstat (limited to '')
-rw-r--r-- | src/WixToolset.Data/Tuples/ShortcutTuple.cs | 164 |
1 files changed, 164 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Tuples/ShortcutTuple.cs b/src/WixToolset.Data/Tuples/ShortcutTuple.cs new file mode 100644 index 00000000..0591e7f4 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ShortcutTuple.cs | |||
@@ -0,0 +1,164 @@ | |||
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 Shortcut = new IntermediateTupleDefinition( | ||
10 | TupleDefinitionType.Shortcut, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Shortcut), IntermediateFieldType.String), | ||
14 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Directory_), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Name), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Component_), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Target), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Arguments), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Description), IntermediateFieldType.String), | ||
20 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Hotkey), IntermediateFieldType.Number), | ||
21 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Icon_), IntermediateFieldType.String), | ||
22 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.IconIndex), IntermediateFieldType.Number), | ||
23 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.ShowCmd), IntermediateFieldType.Number), | ||
24 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.WkDir), IntermediateFieldType.String), | ||
25 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.DisplayResourceDLL), IntermediateFieldType.String), | ||
26 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.DisplayResourceId), IntermediateFieldType.Number), | ||
27 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.DescriptionResourceDLL), IntermediateFieldType.String), | ||
28 | new IntermediateFieldDefinition(nameof(ShortcutTupleFields.DescriptionResourceId), IntermediateFieldType.Number), | ||
29 | }, | ||
30 | typeof(ShortcutTuple)); | ||
31 | } | ||
32 | } | ||
33 | |||
34 | namespace WixToolset.Data.Tuples | ||
35 | { | ||
36 | public enum ShortcutTupleFields | ||
37 | { | ||
38 | Shortcut, | ||
39 | Directory_, | ||
40 | Name, | ||
41 | Component_, | ||
42 | Target, | ||
43 | Arguments, | ||
44 | Description, | ||
45 | Hotkey, | ||
46 | Icon_, | ||
47 | IconIndex, | ||
48 | ShowCmd, | ||
49 | WkDir, | ||
50 | DisplayResourceDLL, | ||
51 | DisplayResourceId, | ||
52 | DescriptionResourceDLL, | ||
53 | DescriptionResourceId, | ||
54 | } | ||
55 | |||
56 | public class ShortcutTuple : IntermediateTuple | ||
57 | { | ||
58 | public ShortcutTuple() : base(TupleDefinitions.Shortcut, null, null) | ||
59 | { | ||
60 | } | ||
61 | |||
62 | public ShortcutTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Shortcut, sourceLineNumber, id) | ||
63 | { | ||
64 | } | ||
65 | |||
66 | public IntermediateField this[ShortcutTupleFields index] => this.Fields[(int)index]; | ||
67 | |||
68 | public string Shortcut | ||
69 | { | ||
70 | get => (string)this.Fields[(int)ShortcutTupleFields.Shortcut]?.Value; | ||
71 | set => this.Set((int)ShortcutTupleFields.Shortcut, value); | ||
72 | } | ||
73 | |||
74 | public string Directory_ | ||
75 | { | ||
76 | get => (string)this.Fields[(int)ShortcutTupleFields.Directory_]?.Value; | ||
77 | set => this.Set((int)ShortcutTupleFields.Directory_, value); | ||
78 | } | ||
79 | |||
80 | public string Name | ||
81 | { | ||
82 | get => (string)this.Fields[(int)ShortcutTupleFields.Name]?.Value; | ||
83 | set => this.Set((int)ShortcutTupleFields.Name, value); | ||
84 | } | ||
85 | |||
86 | public string Component_ | ||
87 | { | ||
88 | get => (string)this.Fields[(int)ShortcutTupleFields.Component_]?.Value; | ||
89 | set => this.Set((int)ShortcutTupleFields.Component_, value); | ||
90 | } | ||
91 | |||
92 | public string Target | ||
93 | { | ||
94 | get => (string)this.Fields[(int)ShortcutTupleFields.Target]?.Value; | ||
95 | set => this.Set((int)ShortcutTupleFields.Target, value); | ||
96 | } | ||
97 | |||
98 | public string Arguments | ||
99 | { | ||
100 | get => (string)this.Fields[(int)ShortcutTupleFields.Arguments]?.Value; | ||
101 | set => this.Set((int)ShortcutTupleFields.Arguments, value); | ||
102 | } | ||
103 | |||
104 | public string Description | ||
105 | { | ||
106 | get => (string)this.Fields[(int)ShortcutTupleFields.Description]?.Value; | ||
107 | set => this.Set((int)ShortcutTupleFields.Description, value); | ||
108 | } | ||
109 | |||
110 | public int Hotkey | ||
111 | { | ||
112 | get => (int)this.Fields[(int)ShortcutTupleFields.Hotkey]?.Value; | ||
113 | set => this.Set((int)ShortcutTupleFields.Hotkey, value); | ||
114 | } | ||
115 | |||
116 | public string Icon_ | ||
117 | { | ||
118 | get => (string)this.Fields[(int)ShortcutTupleFields.Icon_]?.Value; | ||
119 | set => this.Set((int)ShortcutTupleFields.Icon_, value); | ||
120 | } | ||
121 | |||
122 | public int IconIndex | ||
123 | { | ||
124 | get => (int)this.Fields[(int)ShortcutTupleFields.IconIndex]?.Value; | ||
125 | set => this.Set((int)ShortcutTupleFields.IconIndex, value); | ||
126 | } | ||
127 | |||
128 | public int ShowCmd | ||
129 | { | ||
130 | get => (int)this.Fields[(int)ShortcutTupleFields.ShowCmd]?.Value; | ||
131 | set => this.Set((int)ShortcutTupleFields.ShowCmd, value); | ||
132 | } | ||
133 | |||
134 | public string WkDir | ||
135 | { | ||
136 | get => (string)this.Fields[(int)ShortcutTupleFields.WkDir]?.Value; | ||
137 | set => this.Set((int)ShortcutTupleFields.WkDir, value); | ||
138 | } | ||
139 | |||
140 | public string DisplayResourceDLL | ||
141 | { | ||
142 | get => (string)this.Fields[(int)ShortcutTupleFields.DisplayResourceDLL]?.Value; | ||
143 | set => this.Set((int)ShortcutTupleFields.DisplayResourceDLL, value); | ||
144 | } | ||
145 | |||
146 | public int DisplayResourceId | ||
147 | { | ||
148 | get => (int)this.Fields[(int)ShortcutTupleFields.DisplayResourceId]?.Value; | ||
149 | set => this.Set((int)ShortcutTupleFields.DisplayResourceId, value); | ||
150 | } | ||
151 | |||
152 | public string DescriptionResourceDLL | ||
153 | { | ||
154 | get => (string)this.Fields[(int)ShortcutTupleFields.DescriptionResourceDLL]?.Value; | ||
155 | set => this.Set((int)ShortcutTupleFields.DescriptionResourceDLL, value); | ||
156 | } | ||
157 | |||
158 | public int DescriptionResourceId | ||
159 | { | ||
160 | get => (int)this.Fields[(int)ShortcutTupleFields.DescriptionResourceId]?.Value; | ||
161 | set => this.Set((int)ShortcutTupleFields.DescriptionResourceId, value); | ||
162 | } | ||
163 | } | ||
164 | } \ No newline at end of file | ||