Beispiel #1
0
        private void References_Changed(object sender, SceneNode pathNode, AnnotationEditor.ReferenceInfo info, DocumentNodeMarker damageMarker, DocumentNodeChange damage)
        {
            IEnumerable <string> enumerable = AnnotationUtils.ParseAnnotationReferences(((DocumentPrimitiveNode)pathNode.DocumentNode).GetValue <string>());

            info.ReferencedAnnotationIds = Enumerable.ToList <string>(enumerable);
            info.ReferencedAnnotations   = this.ComputeReferencedAnnotations(enumerable);
            this.InvalidateAdorners(info.ReferenceOwner);
        }
Beispiel #2
0
        private AnnotationEditor.ReferenceInfo References_InsertedHandler(object sender, SceneNode basisNode, object basisContent, SceneNode newPathNode)
        {
            SceneElement         sceneElement = (SceneElement)newPathNode.Parent;
            IEnumerable <string> enumerable   = AnnotationUtils.ParseAnnotationReferences(((DocumentPrimitiveNode)newPathNode.DocumentNode).GetValue <string>());

            return(new AnnotationEditor.ReferenceInfo()
            {
                ReferenceOwner = sceneElement,
                ReferencedAnnotationIds = Enumerable.ToList <string>(enumerable),
                ReferencedAnnotations = this.ComputeReferencedAnnotations(enumerable)
            });
        }
Beispiel #3
0
 public static IEnumerable <string> GetReferencedAnnotationIds(SceneElement element)
 {
     ExceptionChecks.CheckNullArgument <SceneElement>(element, "element");
     return(AnnotationUtils.ParseAnnotationReferences(element.GetLocalOrDefaultValue(AnnotationSceneNode.ReferencesProperty) as string ?? string.Empty));
 }