Esempio n. 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (FontName != null ? FontName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ FontSize;
         //hashCode = (hashCode * 397) ^ (int)TextStyle;
         hashCode = (hashCode * 397) ^ FontColor.GetHashCode();
         hashCode = (hashCode * 397) ^ (Aligment != null ? Aligment.GetHashCode() : 0);
         return(hashCode);
     }
 }
Esempio n. 2
0
 public override int GetHashCode()
 {
     return(Bold.GetHashCode()
            ^ Italic.GetHashCode()
            ^ (Int32)Underline
            ^ Strikethrough.GetHashCode()
            ^ (Int32)VerticalAlignment
            ^ Shadow.GetHashCode()
            ^ FontSize.GetHashCode()
            ^ FontColor.GetHashCode()
            ^ FontName.GetHashCode()
            ^ (Int32)FontFamilyNumbering);
 }
Esempio n. 3
0
        public override int GetHashCode()
        {
            var hashCode = 1158783753;

            hashCode = hashCode * -1521134295 + Bold.GetHashCode();
            hashCode = hashCode * -1521134295 + Italic.GetHashCode();
            hashCode = hashCode * -1521134295 + Underline.GetHashCode();
            hashCode = hashCode * -1521134295 + Strikethrough.GetHashCode();
            hashCode = hashCode * -1521134295 + VerticalAlignment.GetHashCode();
            hashCode = hashCode * -1521134295 + Shadow.GetHashCode();
            hashCode = hashCode * -1521134295 + FontSize.GetHashCode();
            hashCode = hashCode * -1521134295 + FontColor.GetHashCode();
            hashCode = hashCode * -1521134295 + StringComparer.InvariantCultureIgnoreCase.GetHashCode(FontName);
            hashCode = hashCode * -1521134295 + FontFamilyNumbering.GetHashCode();
            hashCode = hashCode * -1521134295 + FontCharSet.GetHashCode();
            return(hashCode);
        }
Esempio n. 4
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>
 /// A 32-bit signed integer that is the hash code for this instance.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Text?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ DropShadow.GetHashCode();
         hashCode = (hashCode * 397) ^ (FontFamily?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)Style;
         hashCode = (hashCode * 397) ^ FontColor.GetHashCode();
         hashCode = (hashCode * 397) ^ Opacity;
         hashCode = (hashCode * 397) ^ FontSize;
         hashCode = (hashCode * 397) ^ Position.GetHashCode();
         hashCode = (hashCode * 397) ^ Vertical.GetHashCode();
         hashCode = (hashCode * 397) ^ RightToLeft.GetHashCode();
         return(hashCode);
     }
 }
Esempio n. 5
0
        /// <summary>
        /// Returns the hashcode for this object.
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            return(HashCoder.GetHash(
                       FApplyFontSize20.GetHashCode(),
                       FApplyFontSize20 ? FFontSize20.GetHashCode() : 0,
                       FApplyFontColor.GetHashCode(),
                       FApplyFontColor ? FontColor.GetHashCode() : 0,

                       FApplyFontStyleBoldAndItalic.GetHashCode(),
                       FApplyFontStyleSubSuperscript.GetHashCode(),
                       FApplyFontStyleStrikeout.GetHashCode(),
                       FApplyFontStyleBoldAndItalic || FApplyFontStyleSubSuperscript || FApplyFontStyleStrikeout ? FFontStyle.GetHashCode() : 0,

                       FApplyFontUnderline.GetHashCode(),
                       FApplyFontUnderline ? FFontUnderline.GetHashCode() : 0,

                       FApplyPatternStyle.GetHashCode(),
                       FApplyPatternStyle ? FPatternStyle.GetHashCode() : 0,

                       FApplyPatternFg.GetHashCode(),
                       FApplyPatternFg ? FPatternFgColor.GetHashCode() : 0,

                       FApplyPatternBg.GetHashCode(),
                       FApplyPatternBg ? PatternBgColor.GetHashCode() : 0,


                       FApplyBorderLeft.GetHashCode(),
                       FApplyBorderLeft ? FBorderLeft.GetHashCode() : 0,
                       FApplyBorderRight.GetHashCode(),
                       FApplyBorderRight ? FBorderRight.GetHashCode() : 0,
                       FApplyBorderTop.GetHashCode(),
                       FApplyBorderTop ? FBorderTop.GetHashCode() : 0,
                       FApplyBorderBottom.GetHashCode(),
                       FApplyBorderBottom ? FBorderBottom.GetHashCode() : 0
                       ));
        }
 public override int GetHashCode()
 {
     return(FontSize.GetHashCode() ^ FontName.GetHashCode() ^ FontBold.GetHashCode() ^ FontColor.GetHashCode() ^ FGColor.GetHashCode() ^ Borders[0].GetHashCode() ^ Borders[1].GetHashCode() ^ Borders[2].GetHashCode() ^ Borders[3].GetHashCode() ^ CellWidth.GetHashCode() ^ CellHeight.GetHashCode() ^ HorizontalAlignment.GetHashCode() ^ VerticalAlignment.GetHashCode() ^ WrapText.GetHashCode());
 }