示例#1
0
        public void InsertTreeControl(UserControl control)
        {
            VisualNavigatorNode newNode;

            if (!dict.ContainsKey(control))
            {
                newNode = new VisualNavigatorNode()
                {
                    Control = control
                };

                dict[control] = newNode;
            }
            else
            {
                newNode = dict[control];
            }

            // низ текущего прикрепляем у низу нового
            newNode.Link(LinkDirection.ldBottom, this.FocusedNode.GetLinkedNode(LinkDirection.ldBottom));
            OnPropertyChanged("TopDirectionModelName");

            // верх нового прикрепляем к низу текущего
            LinkControl(LinkDirection.ldBottom, control);
            OnPropertyChanged("BottomDirectionModelName");

            // левая сторона нового = левой стороне текущего
            newNode.Link(LinkDirection.ldLeft, this.FocusedNode.GetLinkedNode(LinkDirection.ldLeft));
            OnPropertyChanged("LeftDirectionModelName");

            // правая сторона нового = правой стороне текущего
            newNode.Link(LinkDirection.ldRight, this.FocusedNode.GetLinkedNode(LinkDirection.ldRight));
            OnPropertyChanged("RightDirectionModelName");
        }
示例#2
0
 private void AddLinkedControl(UserControl control)
 {
     dict[control] = new VisualNavigatorNode()
     {
         Control = control
     };
 }
示例#3
0
        public void Link(LinkDirection direction, VisualNavigatorNode node)
        {
            arr[(int)direction] = node;

            // link back
            if (node != null)
            {
                var invertDirection = LinkDirectionHelper.Invert(direction);
                var invertDirectionNode = node.GetLinkedNode(invertDirection);
                if (invertDirectionNode != this) node.Link(invertDirection, this);
            }
        }
示例#4
0
        public void Link(LinkDirection direction, VisualNavigatorNode node)
        {
            arr[(int)direction] = node;

            // link back
            if (node != null)
            {
                var invertDirection     = LinkDirectionHelper.Invert(direction);
                var invertDirectionNode = node.GetLinkedNode(invertDirection);
                if (invertDirectionNode != this)
                {
                    node.Link(invertDirection, this);
                }
            }
        }
示例#5
0
        public void InsertTreeControl(UserControl control)
        {
            VisualNavigatorNode newNode;

            if (!dict.ContainsKey(control))
            {
                newNode = new VisualNavigatorNode()
                {
                    Control = control
                };

                dict[control] = newNode;
            }
            else newNode = dict[control];

            // низ текущего прикрепляем у низу нового
            newNode.Link(LinkDirection.ldBottom, this.FocusedNode.GetLinkedNode(LinkDirection.ldBottom));
            OnPropertyChanged("TopDirectionModelName");

            // верх нового прикрепляем к низу текущего
            LinkControl(LinkDirection.ldBottom, control);
            OnPropertyChanged("BottomDirectionModelName");

            // левая сторона нового = левой стороне текущего
            newNode.Link(LinkDirection.ldLeft, this.FocusedNode.GetLinkedNode(LinkDirection.ldLeft));
            OnPropertyChanged("LeftDirectionModelName");

            // правая сторона нового = правой стороне текущего
            newNode.Link(LinkDirection.ldRight, this.FocusedNode.GetLinkedNode(LinkDirection.ldRight));
            OnPropertyChanged("RightDirectionModelName");

        }
示例#6
0
 private void AddLinkedControl(UserControl control)
 {
     dict[control] = new VisualNavigatorNode()
     {
         Control = control
     };
 }