public override void Trigger(EditableView.ClickPosition.Sources source, EditableView pnlView, Transaction transaction) { if (CurrentDocument.AddPage(CurrentPage, transaction, true, CurrentPageIndex + Offset, Duplicate) != null) { Editor.DisplayPage(CurrentPageIndex + Offset); } }
{ // adds another page if at the end public override void Trigger(EditableView.ClickPosition.Sources source, EditableView pnlView, Transaction transaction) { if (CurrentPageIndex >= CurrentDocument.Count - 1) { if (CurrentDocument.AddPage(CurrentPage, transaction, true) == null) { return; } } Editor.DisplayPage(CurrentPageIndex + 1); }