/// <summary> /// Event triggered when the "Add Space" button is pressed. /// </summary> private void btnAddSpace_Click(object sender, EventArgs e) { AddPageForm addPageForm = new AddPageForm(ref Globals.XWikiAddIn.wiki, true, false); new AddPageFormManager(ref addPageForm).EnqueueAllHandlers(); addPageForm.ShowDialog(); }
private void btnSavePage_Click(object sender, RibbonControlEventArgs e) { try { if (Addin.currentPageFullName == "" || Addin.currentPageFullName == null) { AddPageForm addPageForm = new AddPageForm(ref Addin.wiki, false, true); new AddPageFormManager(ref addPageForm).EnqueueAllHandlers(); addPageForm.ShowDialog(); } else { try { Addin.AddinActions.SaveToServer(); } catch (Exception ex) { Log.Exception(ex); UserNotifier.Exclamation("There was an error when trying to save the page to the server"); } } } catch (NullReferenceException ex) { Log.Exception(ex); UserNotifier.Exclamation("You are not currently editing a wiki page"); } }
public static void ActionNewSpaceOrPage() { if (Globals.XWord2003AddIn.Wiki != null) { AddPageForm addPageForm = new AddPageForm(ref Globals.XWord2003AddIn.Wiki); new AddPageFormManager(ref addPageForm).EnqueueAllHandlers(); addPageForm.ShowDialog(); } else { UserNotifier.Error(UIMessages.WIKI_STRUCTURE_NOT_LOADED); } }
private void btnAddPage_Click(object sender, RibbonControlEventArgs e) { TreeView treeView = Globals.XWikiAddIn.XWikiTaskPane.treeView; if (treeView.SelectedNode != null) { String spaceName = treeView.SelectedNode.Text; AddPageForm addPageForm = new AddPageForm(ref Globals.XWikiAddIn.wiki, spaceName); new AddPageFormManager(ref addPageForm).EnqueueAllHandlers(); addPageForm.Show(); } else { //see XOFFICE-20 //MessageBox.Show("You need to select a space in the wiki explorer.","XWord"); AddPageForm addPageForm = new AddPageForm(ref Globals.XWikiAddIn.wiki, true, false); new AddPageFormManager(ref addPageForm).EnqueueAllHandlers(); addPageForm.ShowDialog(); } }