/// <summary> /// Reads xml from the xml reader. /// </summary> /// <param name="reader">The xml reader.</param> protected override void OnReadXml(XmlReader reader) { base.OnReadXml(reader); string name = reader.Name; if (name != null) { if (name != "Operator") { if (name != "Text") { return; } } else { this.op = (TextComparisonOperator)Serializer.DeserializeObj(typeof(TextComparisonOperator), reader); return; } this.text = (string)(Serializer.DeserializeObj(typeof(string), reader) as string); } }
/// <summary> /// Creates a new text rule with the specified comparison operator, text, and style. /// </summary> /// <param name="op">The comparison operator.</param> /// <param name="text">The text for comparison.</param> /// <param name="style">The cell style.</param> /// <returns>The new text rule that is created. </returns> public static SpecificTextRule Create(TextComparisonOperator op, string text, StyleInfo style) { return(new SpecificTextRule(op, text, style)); }
/// <summary> /// Creates a new text rule with the specified comparison operator, text, and style. /// </summary> /// <param name="op">The comparison operator.</param> /// <param name="text">The text for comparison.</param> /// <param name="style">Cell style.</param> internal SpecificTextRule(TextComparisonOperator op, string text, StyleInfo style) : base(style) { this.op = op; this.text = text; }
/// <summary> /// Resets the rule. /// </summary> protected override void Reset() { base.Reset(); this.op = TextComparisonOperator.Contains; this.text = string.Empty; }