Пример #1
0
 public void BindOneWay(BindingNode nextNode)
 {
     if (!LeftNodes.Contains(nextNode))
     {
         LeftNodes.Add(nextNode);
     }
     nextNode.OneWay = true;
 }
Пример #2
0
        public void RemoveRightBindings(BindingNode node)
        {
            bool removed = LeftNodes.Remove(node);

            if (LeftNodes.Count == 0)
            {
                RemoveNode();
            }
        }
Пример #3
0
        public void RemoveLeftBindings(BindingNode node)
        {
            bool removed = RightNodes.Remove(node);

            if (RightNodes.Count == 0 && (removed || OneWay))
            {
                RemoveNode();
            }
        }
Пример #4
0
 public void Bind(BindingNode nextNode)
 {
     if (!RightNodes.Contains(nextNode))
     {
         RightNodes.Add(nextNode);
     }
     if (!nextNode.LeftNodes.Contains(this))
     {
         nextNode.LeftNodes.Add(this);
     }
 }