LinkParam.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using ComPDFKit.Import;
  2. using ComPDFKit.PDFAnnotation;
  3. using ComPDFKit.PDFDocument.Action;
  4. using System.Windows;
  5. namespace ComPDFKit.Tool
  6. {
  7. public class LinkParam:AnnotParam
  8. {
  9. public LinkParam ()
  10. {
  11. CurrentType = C_ANNOTATION_TYPE.C_ANNOTATION_LINK;
  12. }
  13. public string Uri { get; set; } = string.Empty;
  14. public int DestinationPageIndex { get; set; }
  15. public CPoint DestinationPosition { get; set; }
  16. public C_ACTION_TYPE Action { get; set; }
  17. public override bool CopyTo(AnnotParam transfer)
  18. {
  19. LinkParam linkTransfer = transfer as LinkParam;
  20. if (linkTransfer == null)
  21. {
  22. return false;
  23. }
  24. if (!base.CopyTo(linkTransfer))
  25. {
  26. return false;
  27. }
  28. linkTransfer.Uri = Uri;
  29. linkTransfer.DestinationPageIndex = DestinationPageIndex;
  30. linkTransfer.DestinationPosition = DestinationPosition;
  31. linkTransfer.Action = Action;
  32. return true;
  33. }
  34. }
  35. }