コード例 #1
0
ファイル: Section.cs プロジェクト: Zebra/iFactr-Android
 /// <summary>
 /// Initializes a new instance of the <see cref="Section"/> class.
 /// </summary>
 /// <param name="itemCount">The total number of <see cref="ICell"/> objects that will go into the section.</param>
 /// <param name="headerText">The text for the section header.</param>
 /// <param name="footerText">The text for the section footer.</param>
 public Section(int itemCount, string headerText, string footerText)
     : this(itemCount, headerText)
 {
     if (footerText != null)
     {
         Footer = new SectionFooter(footerText);
     }
 }
コード例 #2
0
        /// <summary>
        /// Determines whether the specified <see cref="ISectionFooter"/> is equal to this instance.
        /// </summary>
        /// <param name="other">The <see cref="ISectionFooter"/> to compare with this instance.</param>
        /// <returns><c>true</c> if the specified <see cref="ISectionFooter"/> is equal to this instance;
        /// otherwise, <c>false</c>.</returns>
        public bool Equals(ISectionFooter other)
        {
            SectionFooter header = other as SectionFooter;

            if (header != null)
            {
                return(Pair == header.Pair);
            }

            return(Pair == other);
        }
コード例 #3
0
        /// <summary>
        /// Determines whether the specified <see cref="System.Object"/> is equal to this instance.
        /// </summary>
        /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param>
        /// <returns><c>true</c> if the specified <see cref="System.Object"/> is equal to this instance;
        /// otherwise, <c>false</c>.</returns>
        public override bool Equals(object obj)
        {
            SectionFooter header = obj as SectionFooter;

            if (header != null)
            {
                return(Pair == header.Pair);
            }

            ISectionFooter iheader = obj as ISectionFooter;

            if (iheader != null)
            {
                return(Pair == iheader);
            }

            return(false);
        }