UpdateAttributeHelper.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using ComPDFKitViewer;
  2. using ComPDFKitViewer.AnnotEvent;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace PDF_Office.Helper
  9. {
  10. /// <summary>
  11. /// 更新属性
  12. /// </summary>
  13. public class UpdateAttributeHelper
  14. {
  15. private AnnotAttribEvent annotAttribEvent;
  16. private AnnotEditEvent annotEditEvent;
  17. public UpdateAttributeHelper(AnnotAttribEvent Event)
  18. {
  19. annotAttribEvent = Event;
  20. }
  21. public UpdateAttributeHelper(AnnotEditEvent Event)
  22. {
  23. annotEditEvent = Event;
  24. }
  25. public void UpdateAttrib(AnnotAttrib attrib, object updateData)
  26. {
  27. if (annotAttribEvent != null)
  28. {
  29. annotAttribEvent.UpdateAttrib(attrib, updateData);
  30. }
  31. if (annotEditEvent != null)
  32. {
  33. }
  34. }
  35. public void UpdateAnnot()
  36. {
  37. if (annotAttribEvent != null)
  38. {
  39. annotAttribEvent.UpdateAnnot();
  40. }
  41. if (annotEditEvent != null && annotEditEvent.EditAnnotArgs != null)
  42. {
  43. annotEditEvent.EditAnnotArgs.UpdateAnnotByEventArgs();
  44. }
  45. }
  46. }
  47. }