Пример #1
0
        /// <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);
            }
        }
Пример #2
0
 /// <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));
 }
Пример #3
0
 /// <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;
 }
Пример #4
0
 /// <summary>
 /// Resets the rule.
 /// </summary>
 protected override void Reset()
 {
     base.Reset();
     this.op   = TextComparisonOperator.Contains;
     this.text = string.Empty;
 }