コード例 #1
0
        public AttachPoint Attach(AttachDirection direction, ConnectionViewModel connection, NodeBaseViewModel associatedControl)
        {
            AttachPoint attachPoint = new AttachPoint(direction, connection, associatedControl);

            attachPoint.DirectionChanging += attachPoint_DirectionChanging;
            AttachPoints[direction].Add(attachPoint);
            UpdateAttachPoints();
            return(attachPoint);
        }
コード例 #2
0
 public void Detach(AttachPoint ap)
 {
     AttachPlacement.Detach(ap);
 }
コード例 #3
0
 public void Detach(AttachPoint point)
 {
     AttachPoints[point.Side].Remove(point);
     point.DirectionChanging -= attachPoint_DirectionChanging;
     UpdateAttachPoints();
 }
コード例 #4
0
 void attachPoint_DirectionChanging(AttachPoint ap, AttachDirection direction)
 {
     AttachPoints[ap.Side].Remove(ap);
     AttachPoints[direction].Add(ap);
     //UpdatePoints();
 }