@joebigelow / wix-1 / commits / 000b9b6b

Move Control\Condition inner text to appropriate Condition attribute

Rob Mensching committed Jun 22, 2020 at 23:10 UTC 000b9b6bd037a5ddbf4743629fba43bd0c5b16ce
1 file changed +76
src/WixToolset.Core/Compiler_UI.cs
+76
@@ -1086,6 +1086,12 @@ namespace WixToolset.Core
1086 string x = null;
1087 string y = null;
1088
1089 + string defaultCondition = null;
1090 + string enableCondition = null;
1091 + string disableCondition = null;
1092 + string hideCondition = null;
1093 + string showCondition = null;
1094 +
1095 var hidden = false;
1096 var sunken = false;
1097 var indirect = false;
@@ -1221,6 +1227,21 @@ namespace WixToolset.Core
1227 case "Default":
1228 isDefault = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
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;
1245 case "Height":
1246 height = this.Core.GetAttributeLocalizableIntegerValue(sourceLineNumbers, attrib, 0, Int16.MaxValue);
1247 break;
@@ -1556,6 +1577,61 @@ namespace WixToolset.Core
1577
1578 tuple = controlTuple;
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 + }
1635 }
1636
1637 if (!notTabbable)