GetChildIndexInList() public method

public GetChildIndexInList ( ) : int
return int
示例#1
0
        public MemoryElement GetNextNode()
        {
            MemoryElement result;

            if (this.expanded && this.children.Count > 0)
            {
                result = this.children[0];
            }
            else
            {
                int num = this.GetChildIndexInList() + 1;
                if (num < this.parent.children.Count)
                {
                    result = this.parent.children[num];
                }
                else
                {
                    MemoryElement memoryElement = this.parent;
                    while (memoryElement.parent != null)
                    {
                        int num2 = memoryElement.GetChildIndexInList() + 1;
                        if (num2 < memoryElement.parent.children.Count)
                        {
                            result = memoryElement.parent.children[num2];
                            return(result);
                        }
                        memoryElement = memoryElement.parent;
                    }
                    result = null;
                }
            }
            return(result);
        }
        public MemoryElement GetNextNode()
        {
            if (expanded && children.Count > 0)
            {
                return(children[0]);
            }

            int nextsiblingindex = GetChildIndexInList() + 1;

            if (nextsiblingindex < parent.children.Count)
            {
                return(parent.children[nextsiblingindex]);
            }
            MemoryElement p = parent;

            while (p.parent != null)
            {
                int parentsiblingindex = p.GetChildIndexInList() + 1;
                if (parentsiblingindex < p.parent.children.Count)
                {
                    return(p.parent.children[parentsiblingindex]);
                }
                p = p.parent;
            }
            return(null);
        }
示例#3
0
        public MemoryElement GetNextNode()
        {
            if (this.expanded && this.children.Count > 0)
            {
                return(this.children[0]);
            }
            int num = this.GetChildIndexInList() + 1;

            if (num < this.parent.children.Count)
            {
                return(this.parent.children[num]);
            }
            MemoryElement memoryElement = this.parent;

            while (memoryElement.parent != null)
            {
                int num2 = memoryElement.GetChildIndexInList() + 1;
                if (num2 < memoryElement.parent.children.Count)
                {
                    return(memoryElement.parent.children[num2]);
                }
                memoryElement = memoryElement.parent;
            }
            return(null);
        }
示例#4
0
        public MemoryElement GetNextNode()
        {
            if (this.expanded && (this.children.Count > 0))
            {
                return(this.children[0]);
            }
            int num = this.GetChildIndexInList() + 1;

            if (num < this.parent.children.Count)
            {
                return(this.parent.children[num]);
            }
            for (MemoryElement element = this.parent; element.parent != null; element = element.parent)
            {
                int num2 = element.GetChildIndexInList() + 1;
                if (num2 < element.parent.children.Count)
                {
                    return(element.parent.children[num2]);
                }
            }
            return(null);
        }
示例#5
0
        public MemoryElement GetNextNode()
        {
            if (this.expanded && this.children.Count > 0)
            {
                return(this.children[0]);
            }
            int index1 = this.GetChildIndexInList() + 1;

            if (index1 < this.parent.children.Count)
            {
                return(this.parent.children[index1]);
            }
            for (MemoryElement parent = this.parent; parent.parent != null; parent = parent.parent)
            {
                int index2 = parent.GetChildIndexInList() + 1;
                if (index2 < parent.parent.children.Count)
                {
                    return(parent.parent.children[index2]);
                }
            }
            return((MemoryElement)null);
        }
 public MemoryElement GetNextNode()
 {
   if (this.expanded && this.children.Count > 0)
     return this.children[0];
   int index1 = this.GetChildIndexInList() + 1;
   if (index1 < this.parent.children.Count)
     return this.parent.children[index1];
   for (MemoryElement parent = this.parent; parent.parent != null; parent = parent.parent)
   {
     int index2 = parent.GetChildIndexInList() + 1;
     if (index2 < parent.parent.children.Count)
       return parent.parent.children[index2];
   }
   return (MemoryElement) null;
 }