StickyNoteParam.cs 978 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using ComPDFKit.PDFAnnotation;
  2. using System.Windows.Media;
  3. namespace ComPDFKit.Tool
  4. {
  5. public class StickyNoteParam:AnnotParam
  6. {
  7. public StickyNoteParam ()
  8. {
  9. CurrentType = C_ANNOTATION_TYPE.C_ANNOTATION_TEXT;
  10. }
  11. public byte[] StickyNoteColor { get; set; }
  12. public string IconName { get; set; } = string.Empty;
  13. public override bool CopyTo(AnnotParam transfer)
  14. {
  15. StickyNoteParam stickynoteTransfer = transfer as StickyNoteParam;
  16. if (stickynoteTransfer == null)
  17. {
  18. return false;
  19. }
  20. if (!base.CopyTo(stickynoteTransfer))
  21. {
  22. return false;
  23. }
  24. if(StickyNoteColor != null)
  25. {
  26. stickynoteTransfer.StickyNoteColor = (byte[])StickyNoteColor.Clone();
  27. }
  28. stickynoteTransfer.IconName = IconName;
  29. return true;
  30. }
  31. }
  32. }