private CaptureInfo CaptureFillForms(PdfForms fillForms) { var ret = new CaptureInfo(); if (fillForms == null) return ret; ret.forms = fillForms; ret.sync = fillForms.SynchronizingObject; fillForms.SynchronizingObject = new DispatcherISyncInvoke(Dispatcher); ret.color = fillForms.SetHighlightColorEx(FormFieldTypes.FPDF_FORMFIELD_UNKNOWN, Helpers.ToArgb(FormHighlightColor)); fillForms.AppBeep += FormsAppBeep; fillForms.DoGotoAction += FormsDoGotoAction; fillForms.DoNamedAction += FormsDoNamedAction; fillForms.GotoPage += FormsGotoPage; fillForms.Invalidate += FormsInvalidate; fillForms.OutputSelectedRect += FormsOutputSelectedRect; fillForms.SetCursor += FormsSetCursor; return ret; }
/// <summary> /// Initializes a new instance of the PdfViewer class. /// </summary> public PdfViewer() { LoadingIconText = Properties.Resources.LoadingText; Background = SystemColors.ControlDarkBrush; _fillForms = new PdfForms(); CaptureFillForms(_fillForms); }