示例#1
0
        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();
                }
            }
        }
示例#2
0
 public AnnotationMaintainer()
 {
     annotations = new Dictionary <Annotation, Word.Comment>();
     manager     = new AnnotationsIO(Globals.XWikiAddIn.Client);
     Globals.XWikiAddIn.ClientInstanceChanged += new XWikiAddIn.ClientInstanceChangedHandler(ClientChanged);
 }
示例#3
0
 private void ClientChanged(Object sender, EventArgs args)
 {
     manager = new AnnotationsIO(Globals.XWikiAddIn.Client);
 }