private async void ShowOutline() { var pageNumber = await OutlineDialog.ShowAsync(_outline); if (pageNumber.HasValue) { CurrentPageNumber = pageNumber.Value; } }
public override void Execute(params object[] args) { using (var dialog = new OutlineDialog()) { if (dialog.ShowDialog(owner) == DialogResult.OK) { using (var one = new OneNote(out var page, out ns)) { if (page.IsValid) { headings = page.GetHeadings(one); if (dialog.CleanupNumbering) { RemoveOutlineNumbering(); } if (dialog.NumericNumbering) { AddOutlineNumbering(true, 0, 0, 1, string.Empty); } else if (dialog.AlphaNumbering) { AddOutlineNumbering(false, 0, 0, 1, string.Empty); } if (dialog.Indent || dialog.IndentTagged) { IndentContent(page, dialog.Indent, dialog.IndentTagged, dialog.TagSymbol, dialog.RemoveTags); } // if OK then something must have happened, so save it one.Update(page); } } } } }