예제 #1
0
        /// <summary>
        /// Returns the ID of a given Style object in this collection.
        /// </summary>
        /// <param name="style">The Style object whose ID is to be returned.</param>
        /// <returns>The ID of the given Style object in this collection.</returns>
        public ushort?GetID(Style style)
        {
            ushort?id = null;

            if (_styles == null)
            {
                return(id);
            }

            for (ushort i = 0; i < _styles.Count; i++)
            {
                Style styleItem = _styles[i];
                if (styleItem.Equals(style))
                {
                    id = i;
                    break;
                }
            }

            return(id);
        }
예제 #2
0
        // Token: 0x06000251 RID: 593 RVA: 0x0000ABF0 File Offset: 0x00009BF0
        public ushort?GetID(Style style)
        {
            ushort?result = null;

            if (this._styles == null)
            {
                return(result);
            }
            ushort num = 0;

            while ((int)num < this._styles.Count)
            {
                Style style2 = this._styles[(int)num];
                if (style2.Equals(style))
                {
                    result = new ushort?(num);
                    break;
                }
                num += 1;
            }
            return(result);
        }
예제 #3
0
파일: XF.cs 프로젝트: radtek/shi5588
        internal bool Equals(XF that)
        {
            if (_horizontalAlignment != that._horizontalAlignment)
            {
                return(false);
            }
            if (_textWrapRight != that._textWrapRight)
            {
                return(false);
            }
            if (_verticalAlignment != that._verticalAlignment)
            {
                return(false);
            }
            if (_rotation != that._rotation)
            {
                return(false);
            }
            if (_indentLevel != that._indentLevel)
            {
                return(false);
            }
            if (_shrinkToCell != that._shrinkToCell)
            {
                return(false);
            }
            if (_textDirection != that._textDirection)
            {
                return(false);
            }
            if (_cellLocked != that._cellLocked)
            {
                return(false);
            }
            if (_formulaHidden != that._formulaHidden)
            {
                return(false);
            }
            if (_isStyleXF != that._isStyleXF)
            {
                return(false);
            }
            if (_useNumber != that._useNumber)
            {
                return(false);
            }
            if (_useFont != that._useFont)
            {
                return(false);
            }
            if (_useMisc != that._useMisc)
            {
                return(false);
            }
            if (_useBorder != that._useBorder)
            {
                return(false);
            }
            if (_useBackground != that._useBackground)
            {
                return(false);
            }
            if (_useProtection != that._useProtection)
            {
                return(false);
            }
            if (_leftLineStyle != that._leftLineStyle)
            {
                return(false);
            }
            if (_rightLineStyle != that._rightLineStyle)
            {
                return(false);
            }
            if (_topLineStyle != that._topLineStyle)
            {
                return(false);
            }
            if (_bottomLineStyle != that._bottomLineStyle)
            {
                return(false);
            }
            if (!_leftLineColor.Equals(that._leftLineColor))
            {
                return(false);
            }
            if (!_rightLineColor.Equals(that._rightLineColor))
            {
                return(false);
            }
            if (_diagonalDescending != that._diagonalDescending)
            {
                return(false);
            }
            if (_diagonalAscending != that._diagonalAscending)
            {
                return(false);
            }
            if (!_topLineColor.Equals(that._topLineColor))
            {
                return(false);
            }
            if (!_bottomLineColor.Equals(that._bottomLineColor))
            {
                return(false);
            }
            if (!_diagonalLineColor.Equals(that._diagonalLineColor))
            {
                return(false);
            }
            if (_diagonalLineStyle != that._diagonalLineStyle)
            {
                return(false);
            }
            if (_pattern != that._pattern)
            {
                return(false);
            }
            if (!_patternColor.Equals(that._patternColor))
            {
                return(false);
            }
            if (!_patternBackgroundColor.Equals(that._patternBackgroundColor))
            {
                return(false);
            }

            if (!Font.Equals(that.Font))
            {
                return(false);
            }
            if (!Format.Equals(that.Format))
            {
                return(false);
            }
            if (!Style.Equals(that.Style))
            {
                return(false);
            }

            //if (_targetObject != that._targetObject) return false;

            return(true);
        }