Esempio n. 1
0
        private Node GetPreviousChild(Node child, SortedNodeList <Node> children)
        {
            int index = (child != null) ? children.IndexOf(child) : -1;

            if (index > 0)
            {
                return(children[index - 1]);
            }

            return(null);
        }
Esempio n. 2
0
        private Node GetNextChild(Node child, SortedNodeList <Node> children)
        {
            int index = (child != null) ? children.IndexOf(child) : -1;

            if (index != -1 && index + 1 < children.Count)
            {
                return(children[index + 1]);
            }

            return(null);
        }