Beispiel #1
0
        /// <summary>
        /// Returns true if <paramref name="value"/> is equal to this StyleDTO.
        /// </summary>
        /// <param name="value">The object to check for equality.</param>
        /// <returns>True if the object is equal to this one.</returns>
        public bool Equals(FluentStyle value)
        {
            // Use object.ReferenceEquals to avoid infinite loops.
            if (object.ReferenceEquals(value, null))
            {
                return(false);
            }

            // First check for an exact type match.
            if (!object.ReferenceEquals(GetType(), value.GetType()))
            {
                return(false);
            }

            return(Alignment == value.Alignment &&
                   BorderBottom == value.BorderBottom &&
                   BorderDiagonal == value.BorderDiagonal &&
                   BorderDiagonalColor == value.BorderDiagonalColor &&
                   BorderDiagonalLineStyle == value.BorderDiagonalLineStyle &&
                   BorderLeft == value.BorderLeft &&
                   BorderRight == value.BorderRight &&
                   BorderTop == value.BorderTop &&
                   BottomBorderColor == value.BottomBorderColor &&
                   DataFormat == value.DataFormat &&
                   FillBackgroundColor == value.FillBackgroundColor &&
                   FillForegroundColor == value.FillForegroundColor &&
                   FillPattern == value.FillPattern &&
                   Indention == value.Indention &&
                   LeftBorderColor == value.LeftBorderColor &&
                   RightBorderColor == value.RightBorderColor &&
                   Rotation == value.Rotation &&
                   ShrinkToFit == value.ShrinkToFit &&
                   TopBorderColor == value.TopBorderColor &&
                   VerticalAlignment == value.VerticalAlignment &&
                   WrapText == value.WrapText &&

                   FontWeight == value.FontWeight &&
                   Charset == value.Charset &&
                   Color == value.Color &&
                   FontHeight == value.FontHeight &&
                   FontHeightInPoints == value.FontHeightInPoints &&
                   FontName == value.FontName &&
                   Italic == value.Italic &&
                   Strikeout == value.Strikeout &&
                   SuperScript == value.SuperScript &&
                   Underline == value.Underline &&

                   Format == value.Format);
        }
Beispiel #2
0
 /// <summary>
 /// Initialize a new instance of the <c>FluentCell</c>.
 /// </summary>
 /// <param name="cell">The NPOI cell this <c>FluentCell</c> is associated with.</param>
 public FluentCell(ICell cell)
 {
     Cell  = cell;
     Style = new FluentStyle();
 }
Beispiel #3
0
 /// <summary>
 /// Initialize a new instance of the <c>FluentCell</c>.
 /// </summary>
 /// <param name="cell">The NPOI cell this <c>FluentCell</c> is associated with.</param>
 public FluentCell(ICell cell)
 {
     Cell = cell;
     Style = new FluentStyle();
 }
        /// <summary>
        /// Returns true if <paramref name="value"/> is equal to this StyleDTO.
        /// </summary>
        /// <param name="value">The object to check for equality.</param>
        /// <returns>True if the object is equal to this one.</returns>
        public bool Equals(FluentStyle value)
        {
            // Use object.ReferenceEquals to avoid infinite loops.
            if (object.ReferenceEquals(value, null))
                return false;

            // First check for an exact type match.
            if (!object.ReferenceEquals(GetType(), value.GetType()))
                return false;

            return Alignment == value.Alignment &&
                BorderBottom == value.BorderBottom &&
                BorderDiagonal == value.BorderDiagonal &&
                BorderDiagonalColor == value.BorderDiagonalColor &&
                BorderDiagonalLineStyle == value.BorderDiagonalLineStyle &&
                BorderLeft == value.BorderLeft &&
                BorderRight == value.BorderRight &&
                BorderTop == value.BorderTop &&
                BottomBorderColor == value.BottomBorderColor &&
                DataFormat == value.DataFormat &&
                FillBackgroundColor == value.FillBackgroundColor &&
                FillForegroundColor == value.FillForegroundColor &&
                FillPattern == value.FillPattern &&
                Indention == value.Indention &&
                LeftBorderColor == value.LeftBorderColor &&
                RightBorderColor == value.RightBorderColor &&
                Rotation == value.Rotation &&
                ShrinkToFit == value.ShrinkToFit &&
                TopBorderColor == value.TopBorderColor &&
                VerticalAlignment == value.VerticalAlignment &&
                WrapText == value.WrapText &&

                FontWeight == value.FontWeight &&
                Charset == value.Charset &&
                Color == value.Color &&
                FontHeight == value.FontHeight &&
                FontHeightInPoints == value.FontHeightInPoints &&
                FontName == value.FontName &&
                Italic == value.Italic &&
                Strikeout == value.Strikeout &&
                SuperScript == value.SuperScript &&
                Underline == value.Underline &&

                Format == value.Format;
        }