//**************************************************************************************************** // //**************************************************************************************************** private void Expand(RECURSE recurse, int paramDepth = -1) { if ((parent != null) && (expanded == false)) { expanded = true; ExpandOverride(); if (itemList != null) { itemList.SetUpdateHierarchy(); } } if (paramDepth < 0) { for (UIListItemData cur = parent; (cur != null) && (cur.parent != null); cur = cur.parent) { parent.Expand(RECURSE.NO, 0); } } if (recurse == RECURSE.YES) { for (int child = 0; child < childs.Count; ++child) { childs[child].Expand(recurse, paramDepth + 1); } } }
//**************************************************************************************************** // //**************************************************************************************************** public void Expand(bool expand, RECURSE recurse) { if (expand) { Expand(recurse); } else { Collapse(recurse); } }
//**************************************************************************************************** // //**************************************************************************************************** public void Sort(RECURSE recurse, Comparison <UIListItemData> comparison) { if (comparison != null) { childs.Sort(comparison); if (itemList != null) { itemList.SetUpdateHierarchy(); } if (recurse == RECURSE.YES) { for (int child = 0; child < childs.Count; ++child) { childs[child].Sort(recurse, comparison); } } } }
//**************************************************************************************************** // //**************************************************************************************************** private void Collapse(RECURSE recurse) { if ((parent != null) && (expanded)) { expanded = false; CollapseOverride(); if (itemList != null) { itemList.SetUpdateHierarchy(); } } if (recurse == RECURSE.YES) { for (int child = 0; child < childs.Count; ++child) { childs[child].Collapse(recurse); } } }