/// <summary> /// <inheritdoc/> /// </summary> public void PerformAction(IPDFAction action) { if (action == null) { return; } if (action.ActionType != PDFActionType.Goto) { PerformOutsideAction?.Invoke(this, new PerformActionEventArgs(action)); return; } if (action.Destination == null || action.Destination.PageIndex < 0 || action.Destination.PageIndex >= PageCount) { return; } var previousCurrentPageIndex = CurrentPageIndex; SetCurrentInformation(GetPage(action.Destination.PageIndex)); NavigatedToPage?.Invoke(this, new NavigatedToPageEventArgs(previousCurrentPageIndex, CurrentPageIndex)); }
/// <summary> /// Initializes a new instance of the <see cref="PerformActionEventArgs"/> class. /// </summary> /// <param name="action">Action to perform.</param> public PerformActionEventArgs(IPDFAction action) { Action = action; }