//--------------------------------------------------------------------------
        public Connection()
        {
            DataContextChanged += (e, args) =>
            {
                GraphNodeDataLink.Connection = this;
                GraphNodeDataLink.RaisePropertyChangedEvent("Connection");
                RaisePropertyChangedEvent("GraphNodeDataLink");
            };

            this.LayoutUpdated += (e, args) =>
            {
                UpdatePosition();
            };
        }
示例#2
0
        //--------------------------------------------------------------------------
        public LinkControlPoint(GraphNodeDataLink parent, GraphReferenceControlPoint controlPoint)
        {
            DataContext = this;

            LinkParent        = parent;
            this.controlPoint = controlPoint;

            controlPoint.PropertyChanged += (e, args) =>
            {
                if (args.PropertyName == "Position")
                {
                    RaisePropertyChangedEvent("Position");

                    RaisePropertyChangedEvent("CanvasX");
                    RaisePropertyChangedEvent("CanvasY");

                    LinkParent.RaisePropertyChangedEvent("Link");
                }
                else if (args.PropertyName == "Flip")
                {
                    LinkParent.RaisePropertyChangedEvent("Link");
                }
            };
        }
 //--------------------------------------------------------------------------
 public NodeToCommentLinkWrapper(GraphNodeDataLink link, GraphComment comment) : base(link)
 {
     Comment = comment;
 }
 //--------------------------------------------------------------------------
 public InProgressLinkWrapper(GraphNodeDataLink link) : base(link)
 {
 }
        //--------------------------------------------------------------------------
        public LinkWrapper(GraphNodeDataLink link)
        {
            this.Link = link;

            DataContext = this;
        }
 //--------------------------------------------------------------------------
 public CommentToCommentLinkWrapper(GraphNodeDataLink link, GraphComment commentStart, GraphComment commentEnd) : base(link)
 {
     CommentStart = commentStart;
     CommentEnd   = commentEnd;
 }
 //--------------------------------------------------------------------------
 public CommentToNodeLinkWrapper(GraphNodeDataLink link, GraphComment comment) : base(link)
 {
     Comment = comment;
 }