public LinkedTreeNodes(LinkedTreeViews tree, Mapping mapping)
        {
            this.Mapping = mapping;
            this.trees   = tree;

            this.sourceNode = this.trees.SourceTree.AddNode(
                this.Mapping.source.fullMappingPath.Split('.').ToList()
                );
            this.sourceNode.MappedEnd = mapping.source;
            this.targetNode           = this.trees.TargetTree.AddNode(
                this.Mapping.target.fullMappingPath.Split('.').ToList()
                );
            this.targetNode.MappedEnd = mapping.target;
        }
        private LinkedTreeNode createLinkedTreeNode(string name, TreeNode parent)
        {
            var node = new LinkedTreeNode(name);

            if (parent != null)
            {
                parent.Nodes.Add(node);
            }
            else
            {
                this.Nodes.Add(node);
            }
            return(node);
        }
Пример #3
0
        public LinkedTreeNodes Link(LinkedTreeNode source, LinkedTreeNode target)
        {
            // create new mapping from link information
            var mapping = new AM.TaggedValueMapping(
                (AM.MappingEnd)source.MappedEnd, (AM.MappingEnd)target.MappedEnd
                );

            this.addMapping(mapping);

            // raise Event
            this.CreateMapping(mapping);

            // TODO? invalidated to re-render new links ?
            this.Invalidate();
            return(null);
        }