Esempio n. 1
0
        /// <summary>
        /// Called when reading XML.
        /// </summary>
        /// <param name="reader">The reader.</param>
        protected override void OnReadXml(XmlReader reader)
        {
            base.OnReadXml(reader);
            List <CellRange> list = new List <CellRange>();
            string           name = reader.Name;

            if (name == null)
            {
                goto Label_0068;
            }
            if (name != "Ranges")
            {
                if (name == "Type")
                {
                    goto Label_004D;
                }
                goto Label_0068;
            }
            using (XmlReader reader2 = Serializer.ExtractNode(reader))
            {
                Serializer.DeserializeList((IList)list, reader2);
                goto Label_0068;
            }
Label_004D:
            this.type = (AverageConditionType)Serializer.DeserializeObj(typeof(AverageConditionType), reader);
Label_0068:
            this.ranges = list.ToArray();
        }
Esempio n. 2
0
        /// <summary>
        /// Reads XML from the XML reader.
        /// </summary>
        /// <param name="reader">The XML reader.</param>
        protected override void OnReadXml(XmlReader reader)
        {
            string str;

            base.OnReadXml(reader);
            if (((str = reader.Name) != null) && (str == "Operator"))
            {
                this.op = (AverageConditionType)Serializer.DeserializeObj(typeof(AverageConditionType), reader);
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Creates an AverageCondition object.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="ranges">The ranges.</param>
 /// <returns>The AverageCondition object.</returns>
 public static AverageCondition Create(AverageConditionType type, ICellRange[] ranges)
 {
     return(new AverageCondition(type, ranges));
 }
Esempio n. 4
0
 /// <summary>
 /// Creates a new average condition of the specified type for the specified cell ranges.
 /// </summary>
 /// <param name="type">The average condition type.</param>
 /// <param name="ranges"></param>
 internal AverageCondition(AverageConditionType type, ICellRange[] ranges) : base(null, null)
 {
     this.type   = type;
     this.ranges = ranges;
 }
Esempio n. 5
0
 /// <summary>
 /// Resets this instance.
 /// </summary>
 protected override void Reset()
 {
     base.Reset();
     this.type   = AverageConditionType.Above;
     this.ranges = null;
 }
Esempio n. 6
0
 /// <summary>
 /// Creates an average rule with the specified average condition and style information.
 /// </summary>
 /// <param name="op">
 /// The  <see cref="T:Dt.Cells.Data.AverageConditionType" /> average condition type.
 /// </param>
 /// <param name="style"> The style.</param>
 /// <returns>The new average rule.</returns>
 public static AverageRule Create(AverageConditionType op, StyleInfo style)
 {
     return(new AverageRule(op, style));
 }
Esempio n. 7
0
 /// <summary>
 /// Creates a new text rule with the specified comparison operator, text, and style.
 /// </summary>
 /// <param name="op">Comparison operator.</param>
 /// <param name="style">Cell style.</param>
 internal AverageRule(AverageConditionType op, StyleInfo style) : base(style)
 {
     this.op = op;
 }
Esempio n. 8
0
 /// <summary>
 /// Resets the rule.
 /// </summary>
 protected override void Reset()
 {
     base.Reset();
     this.op = AverageConditionType.Above;
 }