private void toggleAnnotations_Click(object sender, RibbonControlEventArgs e) { if (Addin.currentPageFullName != null) { if (toggleAnnotations.Checked == true) { AnnotationsIO manager = new AnnotationsIO(Addin.Client); List <Annotation> annotations = manager.DownloadAnnotations(Addin.currentPageFullName); AnnotationDisplay display = new AnnotationDisplay(Addin.ActiveDocumentInstance); foreach (Annotation ann in annotations) { display.DisplayAnnotation(ann); } } else { Addin.AnnotationMaintainer.ClearComments(); } } }
public AnnotationMaintainer() { annotations = new Dictionary <Annotation, Word.Comment>(); manager = new AnnotationsIO(Globals.XWikiAddIn.Client); Globals.XWikiAddIn.ClientInstanceChanged += new XWikiAddIn.ClientInstanceChangedHandler(ClientChanged); }
private void ClientChanged(Object sender, EventArgs args) { manager = new AnnotationsIO(Globals.XWikiAddIn.Client); }