/*package*/ internal XSSFConditionalFormattingRule(XSSFSheet sh, CT_CfRule cfRule) { _cfRule = cfRule; _sh = sh; }
/*package*/ internal XSSFConditionalFormattingRule(XSSFSheet sh) { _cfRule = new CT_CfRule(); _sh = sh; }
public void Set(CT_CfRule src) { this.formula = src.formula; this.stopIfTrue = src.stopIfTrue; this.bottom = src.bottom; this.percent = src.percent; this.dxfId = src.dxfId; this.@operator = src.@operator; this.type = src.type; this.equalAverage = src.equalAverage; this.aboveAverage = src.aboveAverage; this.colorScale = src.colorScale; this.dataBar = src.dataBar; this.iconSet = src.iconSet; this.extLst = src.extLst; }
public static CT_CfRule Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) return null; CT_CfRule ctObj = new CT_CfRule(); if (node.Attributes["type"] != null) ctObj.type = (ST_CfType)Enum.Parse(typeof(ST_CfType), node.Attributes["type"].Value); ctObj.dxfId = XmlHelper.ReadUInt(node.Attributes["dxfId"]); ctObj.priority = XmlHelper.ReadInt(node.Attributes["priority"]); ctObj.stopIfTrue = XmlHelper.ReadBool(node.Attributes["stopIfTrue"]); ctObj.aboveAverage = XmlHelper.ReadBool(node.Attributes["aboveAverage"]); ctObj.percent = XmlHelper.ReadBool(node.Attributes["percent"]); ctObj.bottom = XmlHelper.ReadBool(node.Attributes["bottom"]); if (node.Attributes["operator"] != null) ctObj.@operator = (ST_ConditionalFormattingOperator)Enum.Parse(typeof(ST_ConditionalFormattingOperator), node.Attributes["operator"].Value); ctObj.text = XmlHelper.ReadString(node.Attributes["text"]); if (node.Attributes["timePeriod"] != null) ctObj.timePeriod = (ST_TimePeriod)Enum.Parse(typeof(ST_TimePeriod), node.Attributes["timePeriod"].Value); ctObj.rank = XmlHelper.ReadUInt(node.Attributes["rank"]); ctObj.stdDev = XmlHelper.ReadInt(node.Attributes["stdDev"]); ctObj.equalAverage = XmlHelper.ReadBool(node.Attributes["equalAverage"]); ctObj.formula = new List<String>(); foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "colorScale") ctObj.colorScale = CT_ColorScale.Parse(childNode, namespaceManager); else if (childNode.LocalName == "dataBar") ctObj.dataBar = CT_DataBar.Parse(childNode, namespaceManager); else if (childNode.LocalName == "iconSet") ctObj.iconSet = CT_IconSet.Parse(childNode, namespaceManager); else if (childNode.LocalName == "extLst") ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager); else if (childNode.LocalName == "formula") ctObj.formula.Add(childNode.InnerText); } return ctObj; }
public CT_CfRule AddNewCfRule() { if (this.cfRule == null) this.cfRule = new List<CT_CfRule>(); CT_CfRule rule = new CT_CfRule(); this.cfRule.Add(rule); return rule; }
public CT_CfRule AddNewCfRule() { CT_CfRule rule = new CT_CfRule(); this.cfRule.Add(rule); return rule; }