/// <summary> /// Presents the QuickFiling dialog to the user and invokes the given callback /// when completed. /// </summary> /// <param name="title"></param> /// <param name="description"></param> /// <param name="scope"></param> /// <param name="callback"></param> public void SelectLocation( string title, string description, Scope scope, SelectLocationCallback callback) { var dialog = onenote.QuickFiling(); dialog.Title = title; dialog.Description = description; dialog.ParentWindowHandle = onenote.Windows.CurrentWindow.WindowHandle; switch (scope) { case Scope.Notebooks: dialog.TreeDepth = HierarchyElement.heNotebooks; break; case Scope.Sections: dialog.TreeDepth = HierarchyElement.heSections; break; case Scope.Pages: dialog.TreeDepth = HierarchyElement.hePages; break; } dialog.AddButton( Resx.OK, HierarchyElement.heSections, HierarchyElement.heSections, false); dialog.Run(new FilingCallback(callback)); }
public FilingCallback(SelectLocationCallback usercb) { userCallback = usercb; }