diff options
| author | Rob Mensching <rob@firegiant.com> | 2020-06-22 23:10:39 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2020-06-23 02:10:31 -0700 |
| commit | 000b9b6bd037a5ddbf4743629fba43bd0c5b16ce (patch) | |
| tree | f8ee01bf4206ddea35a2dc982c88c0063a28feb4 /src | |
| parent | f18b96045088d6d989e70df19343a99092685e5e (diff) | |
| download | wix-000b9b6bd037a5ddbf4743629fba43bd0c5b16ce.tar.gz wix-000b9b6bd037a5ddbf4743629fba43bd0c5b16ce.tar.bz2 wix-000b9b6bd037a5ddbf4743629fba43bd0c5b16ce.zip | |
Move Control\Condition inner text to appropriate Condition attribute
Diffstat (limited to 'src')
| -rw-r--r-- | src/WixToolset.Core/Compiler_UI.cs | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/src/WixToolset.Core/Compiler_UI.cs b/src/WixToolset.Core/Compiler_UI.cs index 0b5b3980..5c2400e4 100644 --- a/src/WixToolset.Core/Compiler_UI.cs +++ b/src/WixToolset.Core/Compiler_UI.cs | |||
| @@ -1086,6 +1086,12 @@ namespace WixToolset.Core | |||
| 1086 | string x = null; | 1086 | string x = null; |
| 1087 | string y = null; | 1087 | string y = null; |
| 1088 | 1088 | ||
| 1089 | string defaultCondition = null; | ||
| 1090 | string enableCondition = null; | ||
| 1091 | string disableCondition = null; | ||
| 1092 | string hideCondition = null; | ||
| 1093 | string showCondition = null; | ||
| 1094 | |||
| 1089 | var hidden = false; | 1095 | var hidden = false; |
| 1090 | var sunken = false; | 1096 | var sunken = false; |
| 1091 | var indirect = false; | 1097 | var indirect = false; |
| @@ -1221,6 +1227,21 @@ namespace WixToolset.Core | |||
| 1221 | case "Default": | 1227 | case "Default": |
| 1222 | isDefault = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); | 1228 | isDefault = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); |
| 1223 | break; | 1229 | break; |
| 1230 | case "DefaultCondition": | ||
| 1231 | defaultCondition = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1232 | break; | ||
| 1233 | case "EnableCondition": | ||
| 1234 | enableCondition = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1235 | break; | ||
| 1236 | case "DisableCondition": | ||
| 1237 | disableCondition = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1238 | break; | ||
| 1239 | case "HideCondition": | ||
| 1240 | hideCondition = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1241 | break; | ||
| 1242 | case "ShowCondition": | ||
| 1243 | showCondition = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 1244 | break; | ||
| 1224 | case "Height": | 1245 | case "Height": |
| 1225 | height = this.Core.GetAttributeLocalizableIntegerValue(sourceLineNumbers, attrib, 0, Int16.MaxValue); | 1246 | height = this.Core.GetAttributeLocalizableIntegerValue(sourceLineNumbers, attrib, 0, Int16.MaxValue); |
| 1226 | break; | 1247 | break; |
| @@ -1556,6 +1577,61 @@ namespace WixToolset.Core | |||
| 1556 | 1577 | ||
| 1557 | tuple = controlTuple; | 1578 | tuple = controlTuple; |
| 1558 | } | 1579 | } |
| 1580 | |||
| 1581 | if (!String.IsNullOrEmpty(defaultCondition)) | ||
| 1582 | { | ||
| 1583 | this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers) | ||
| 1584 | { | ||
| 1585 | DialogRef = dialog, | ||
| 1586 | ControlRef = controlId.Id, | ||
| 1587 | Action = "Default", | ||
| 1588 | Condition = defaultCondition, | ||
| 1589 | }); | ||
| 1590 | } | ||
| 1591 | |||
| 1592 | if (!String.IsNullOrEmpty(enableCondition)) | ||
| 1593 | { | ||
| 1594 | this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers) | ||
| 1595 | { | ||
| 1596 | DialogRef = dialog, | ||
| 1597 | ControlRef = controlId.Id, | ||
| 1598 | Action = "Enable", | ||
| 1599 | Condition = enableCondition, | ||
| 1600 | }); | ||
| 1601 | } | ||
| 1602 | |||
| 1603 | if (!String.IsNullOrEmpty(disableCondition)) | ||
| 1604 | { | ||
| 1605 | this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers) | ||
| 1606 | { | ||
| 1607 | DialogRef = dialog, | ||
| 1608 | ControlRef = controlId.Id, | ||
| 1609 | Action = "Disable", | ||
| 1610 | Condition = disableCondition, | ||
| 1611 | }); | ||
| 1612 | } | ||
| 1613 | |||
| 1614 | if (!String.IsNullOrEmpty(hideCondition)) | ||
| 1615 | { | ||
| 1616 | this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers) | ||
| 1617 | { | ||
| 1618 | DialogRef = dialog, | ||
| 1619 | ControlRef = controlId.Id, | ||
| 1620 | Action = "Hide", | ||
| 1621 | Condition = hideCondition, | ||
| 1622 | }); | ||
| 1623 | } | ||
| 1624 | |||
| 1625 | if (!String.IsNullOrEmpty(showCondition)) | ||
| 1626 | { | ||
| 1627 | this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers) | ||
| 1628 | { | ||
| 1629 | DialogRef = dialog, | ||
| 1630 | ControlRef = controlId.Id, | ||
| 1631 | Action = "Show", | ||
| 1632 | Condition = showCondition, | ||
| 1633 | }); | ||
| 1634 | } | ||
| 1559 | } | 1635 | } |
| 1560 | 1636 | ||
| 1561 | if (!notTabbable) | 1637 | if (!notTabbable) |
