diff options
| author | Rob Mensching <rob@firegiant.com> | 2019-05-08 13:35:21 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2019-05-08 13:44:59 -0700 |
| commit | ef6485ac4a03333701d343c1e3a52d25805c58f1 (patch) | |
| tree | 3093b1410e651a90c3776b42090bb4e62e98c514 /src/WixToolset.Data/LocalizedControl.cs | |
| parent | 6e7a3274a1710a734e5369d0a1703b9c9ac9345b (diff) | |
| download | wix-ef6485ac4a03333701d343c1e3a52d25805c58f1.tar.gz wix-ef6485ac4a03333701d343c1e3a52d25805c58f1.tar.bz2 wix-ef6485ac4a03333701d343c1e3a52d25805c58f1.zip | |
Add additional strongly typed tuples
Diffstat (limited to 'src/WixToolset.Data/LocalizedControl.cs')
| -rw-r--r-- | src/WixToolset.Data/LocalizedControl.cs | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/WixToolset.Data/LocalizedControl.cs b/src/WixToolset.Data/LocalizedControl.cs index cb60b7ba..1252842b 100644 --- a/src/WixToolset.Data/LocalizedControl.cs +++ b/src/WixToolset.Data/LocalizedControl.cs | |||
| @@ -7,7 +7,7 @@ namespace WixToolset.Data | |||
| 7 | 7 | ||
| 8 | public class LocalizedControl | 8 | public class LocalizedControl |
| 9 | { | 9 | { |
| 10 | public LocalizedControl(string dialog, string control, int x, int y, int width, int height, int attribs, string text) | 10 | public LocalizedControl(string dialog, string control, int x, int y, int width, int height, bool rightToLeft, bool rightAligned, bool leftScroll, string text) |
| 11 | { | 11 | { |
| 12 | this.Dialog = dialog; | 12 | this.Dialog = dialog; |
| 13 | this.Control = control; | 13 | this.Control = control; |
| @@ -15,7 +15,9 @@ namespace WixToolset.Data | |||
| 15 | this.Y = y; | 15 | this.Y = y; |
| 16 | this.Width = width; | 16 | this.Width = width; |
| 17 | this.Height = height; | 17 | this.Height = height; |
| 18 | this.Attributes = attribs; | 18 | this.RightToLeft = rightToLeft; |
| 19 | this.RightAligned = rightAligned; | ||
| 20 | this.LeftScroll = leftScroll; | ||
| 19 | this.Text = text; | 21 | this.Text = text; |
| 20 | } | 22 | } |
| 21 | 23 | ||
| @@ -31,7 +33,11 @@ namespace WixToolset.Data | |||
| 31 | 33 | ||
| 32 | public int Height { get; } | 34 | public int Height { get; } |
| 33 | 35 | ||
| 34 | public int Attributes { get; } | 36 | public bool RightToLeft { get; } |
| 37 | |||
| 38 | public bool RightAligned { get; } | ||
| 39 | |||
| 40 | public bool LeftScroll { get; } | ||
| 35 | 41 | ||
| 36 | public string Text { get; } | 42 | public string Text { get; } |
| 37 | 43 | ||
| @@ -57,11 +63,13 @@ namespace WixToolset.Data | |||
| 57 | }; | 63 | }; |
| 58 | 64 | ||
| 59 | jsonObject.AddIsNotNullOrEmpty("control", this.Control); | 65 | jsonObject.AddIsNotNullOrEmpty("control", this.Control); |
| 60 | jsonObject.AddNonDefaultValue("x", this.X, 0); | 66 | jsonObject.AddNonDefaultValue("x", this.X); |
| 61 | jsonObject.AddNonDefaultValue("y", this.Y, 0); | 67 | jsonObject.AddNonDefaultValue("y", this.Y); |
| 62 | jsonObject.AddNonDefaultValue("width", this.Width, 0); | 68 | jsonObject.AddNonDefaultValue("width", this.Width); |
| 63 | jsonObject.AddNonDefaultValue("height", this.Height, 0); | 69 | jsonObject.AddNonDefaultValue("height", this.Height); |
| 64 | jsonObject.AddNonDefaultValue("attribs", this.Attributes, 0); | 70 | jsonObject.AddNonDefaultValue("rightToLeft", this.RightToLeft); |
| 71 | jsonObject.AddNonDefaultValue("rightAligned", this.RightAligned); | ||
| 72 | jsonObject.AddNonDefaultValue("leftScroll", this.LeftScroll); | ||
| 65 | jsonObject.AddIsNotNullOrEmpty("text", this.Text); | 73 | jsonObject.AddIsNotNullOrEmpty("text", this.Text); |
| 66 | 74 | ||
| 67 | return jsonObject; | 75 | return jsonObject; |
| @@ -75,10 +83,12 @@ namespace WixToolset.Data | |||
| 75 | var y = jsonObject.GetValueOrDefault("y", 0); | 83 | var y = jsonObject.GetValueOrDefault("y", 0); |
| 76 | var width = jsonObject.GetValueOrDefault("width", 0); | 84 | var width = jsonObject.GetValueOrDefault("width", 0); |
| 77 | var height = jsonObject.GetValueOrDefault("height", 0); | 85 | var height = jsonObject.GetValueOrDefault("height", 0); |
| 78 | var attribs = jsonObject.GetValueOrDefault("attribs", 0); | 86 | var rightToLeft = jsonObject.GetValueOrDefault("rightToLeft", false); |
| 87 | var rightAligned = jsonObject.GetValueOrDefault("rightAligned", false); | ||
| 88 | var leftScroll = jsonObject.GetValueOrDefault("leftScroll", false); | ||
| 79 | var text = jsonObject.GetValueOrDefault<string>("text"); | 89 | var text = jsonObject.GetValueOrDefault<string>("text"); |
| 80 | 90 | ||
| 81 | return new LocalizedControl(dialog, control, x, y, width, height, attribs, text); | 91 | return new LocalizedControl(dialog, control, x, y, width, height, rightToLeft, rightAligned, leftScroll, text); |
| 82 | } | 92 | } |
| 83 | } | 93 | } |
| 84 | } | 94 | } |
