示例#1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Determines whether the specified <see cref="T:System.Object"></see> is equal to the
        /// current <see cref="T:System.Object"></see>.
        /// </summary>
        /// <param name="obj">The <see cref="T:System.Object"></see> to compare with the current
        /// <see cref="T:System.Object"></see>.</param>
        /// <returns>
        /// true if the specified <see cref="T:System.Object"></see> is equal to the current
        /// <see cref="T:System.Object"></see>; otherwise, false.
        /// </returns>
        /// ------------------------------------------------------------------------------------
        public override bool Equals(object obj)
        {
            FontInfo other = obj as FontInfo;

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

            return(m_backColor.Value.ToArgb().Equals(other.m_backColor.Value.ToArgb()) &&
                   m_bold.Equals(other.m_bold) && m_features.Equals(other.m_features) &&
                   m_fontColor.Value.ToArgb().Equals(other.m_fontColor.Value.ToArgb()) &&
                   m_fontName.Equals(other.m_fontName) && m_fontSize.Equals(other.m_fontSize) &&
                   m_italic.Equals(other.m_italic) && m_offset.Equals(other.m_offset) &&
                   m_superSub.Equals(other.m_superSub) && m_underline.Equals(other.m_underline) &&
                   m_underlineColor.Value.ToArgb().Equals(other.m_underlineColor.Value.ToArgb()));
        }