public UserControl1(XWikiAddIn addin) { InitializeComponent(); this.addin = addin; client.Credentials = nc; try { String URL = client.ServerURL + XWikiURLs.WikiStructureURL; Stream data = client.OpenRead(URL); StreamReader reader = new StreamReader(data); string s = reader.ReadToEnd(); parseWikiStructure(s); buidTree(); data.Close(); reader.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message, "XWriter", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public UserControl1(XWikiAddIn addin) { InitializeComponent(); this.addin = addin; client.Credentials = nc; try { String URL = client.ServerURL + XWikiURLs.WikiStructureURL; Stream data = client.OpenRead(URL); StreamReader reader = new StreamReader(data); string s = reader.ReadToEnd(); parseWikiStructure(s); buidTree(); data.Close(); reader.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message, "XWriter",MessageBoxButtons.OK,MessageBoxIcon.Error); } }
/// <summary> /// Deletes the annotations and Word comments for a given page. /// </summary> /// <param name="pageId">The full name of a page.</param> public void ClearComments() { XWikiAddIn addin = Globals.XWikiAddIn; if (addin.ActiveDocumentInstance.Comments.Count > 0) { addin.ActiveDocumentInstance.DeleteAllComments(); } List <Annotation> deletedAnnotations = new List <Annotation>(); foreach (Annotation ann in annotations.Keys) { if (ann.PageId == addin.currentPageFullName) { deletedAnnotations.Add(ann); } } foreach (Annotation ann in deletedAnnotations) { annotations.Remove(ann); } }