public bool AddNotebook(string notebook_name) { if (NotebookManager.GetNotebook(notebook_name) != null) { return(false); } Notebook notebook = NotebookManager.GetOrCreateNotebook(notebook_name); if (notebook == null) { return(false); } return(true); }
public bool AddNoteToNotebook(string uri, string notebook_name) { if (note_manager.ReadOnly) { return(false); } Note note = note_manager.FindByUri(uri); if (note == null) { return(false); } Notebook notebook = NotebookManager.GetNotebook(notebook_name); if (notebook == null) { return(false); } return(NotebookManager.MoveNoteToNotebook(note, notebook)); }