/// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (AnnotationLayout != null)
         {
             hashCode = hashCode * 59 + AnnotationLayout.GetHashCode();
         }
         hashCode = hashCode * 59 + StickyNoteIcon.GetHashCode();
         if (Author != null)
         {
             hashCode = hashCode * 59 + Author.GetHashCode();
         }
         if (Subject != null)
         {
             hashCode = hashCode * 59 + Subject.GetHashCode();
         }
         if (Content != null)
         {
             hashCode = hashCode * 59 + Content.GetHashCode();
         }
         hashCode = hashCode * 59 + OpenPopup.GetHashCode();
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         return(hashCode);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Sticky note annotation action constructor
 /// </summary>
 /// <param name="Note">Sticky note text</param>
 /// <param name="Icon">Sticky note icon</param>
 public AnnotStickyNote
 (
     string Note,
     StickyNoteIcon Icon
 ) : base("/Text")
 {
     this.Note = Note;
     this.Icon = Icon;
     return;
 }
Esempio n. 3
0
 /// <summary>
 /// Add sticky note to this page
 /// </summary>
 /// <param name="AbsLeft">Icon page absolute left position</param>
 /// <param name="AbsTop">Icon page absolute top position</param>
 /// <param name="Note">Sticky note text string</param>
 /// <param name="Icon">Sticky note icon enumeration</param>
 /// <returns>PdfAnnotation</returns>
 public PdfAnnotation AddStickyNote
 (
     double AbsLeft,
     double AbsTop,
     string Note,
     StickyNoteIcon Icon
 )
 {
     return(new PdfAnnotation(this, new PdfRectangle(AbsLeft, AbsTop, AbsLeft, AbsTop), new AnnotStickyNote(Note, Icon)));
 }
        /// <summary>
        /// Returns true if StickyNoteAnnotationParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of StickyNoteAnnotationParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(StickyNoteAnnotationParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     AnnotationLayout == input.AnnotationLayout ||
                     (AnnotationLayout != null &&
                      AnnotationLayout.Equals(input.AnnotationLayout))
                     ) &&
                 (
                     StickyNoteIcon == input.StickyNoteIcon ||
                     StickyNoteIcon.Equals(input.StickyNoteIcon)
                 ) &&
                 (
                     Author == input.Author ||
                     (Author != null &&
                      Author.Equals(input.Author))
                 ) &&
                 (
                     Subject == input.Subject ||
                     (Subject != null &&
                      Subject.Equals(input.Subject))
                 ) &&
                 (
                     Content == input.Content ||
                     (Content != null &&
                      Content.Equals(input.Content))
                 ) &&
                 (
                     OpenPopup == input.OpenPopup ||
                     OpenPopup.Equals(input.OpenPopup)
                 ) &&
                 (
                     Color == input.Color ||
                     (Color != null &&
                      Color.Equals(input.Color))
                 ));
        }