Exemple #1
0
        /// <summary>
        /// Returns true if this object is equal to obj.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            TConditionalFormatRule r2 = obj as TConditionalFormatRule;

            if (r2 == null)
            {
                return(false);
            }

            if (r2.StopIfTrue != StopIfTrue)
            {
                return(false);
            }
            if (!TConditionalFormatDef.Equals(FormatDef, r2.FormatDef))
            {
                return(false);
            }

            return(true);
        }
Exemple #2
0
 /// <summary>
 /// Creates a new instance of TConditionalFormatRule, with the corrsponding Format definition.
 /// </summary>
 /// <param name="aFormatDef">Format definition for the rule.</param>
 /// <param name="aStopIfTrue">Only valid on Excel 2007. If true, no more conditional format rules after this one will be applied if this rule applies.</param>
 protected TConditionalFormatRule(TConditionalFormatDef aFormatDef, bool aStopIfTrue)
 {
     FStopIfTrue = aStopIfTrue;
     FFormatDef  = aFormatDef;
 }