using ComPDFKitViewer; using ComPDFKitViewer.AnnotEvent; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace PDF_Master.Helper { /// /// 更新属性 /// public class UpdateAttributeHelper { private AnnotAttribEvent annotAttribEvent; private AnnotEditEvent annotEditEvent; public UpdateAttributeHelper(AnnotAttribEvent Event) { annotAttribEvent = Event; } public UpdateAttributeHelper(AnnotEditEvent Event) { annotEditEvent = Event; } public bool IsCreateForm() { if (annotEditEvent != null) { if(annotEditEvent.EditAction == ActionType.Add) return true; } return false; } public void UpdateAttrib(AnnotAttrib attrib, object updateData) { if (annotAttribEvent != null) { annotAttribEvent.UpdateAttrib(attrib, updateData); } if (annotEditEvent != null) { } } public void UpdateAnnot() { if (annotAttribEvent != null) { annotAttribEvent.UpdateAnnot(); } if (annotEditEvent != null && annotEditEvent.EditAnnotArgs != null) { annotEditEvent.EditAnnotArgs.UpdateAnnotByEventArgs(); } } } }