private static void SetHiddenItems(ITreeItem item, int[] hashs) { item.Visible = !hashs.Contains(item.GetHashCode()); if (item.Children == null) { return; } foreach (ITreeItem child in item.Children) { SetHiddenItems(child, hashs); } }
private static void GetHiddenItems(ITreeItem item, ref List <int> hashs) { if (!item.Visible) { hashs.Add(item.GetHashCode()); } if (item.Children == null) { return; } foreach (ITreeItem child in item.Children) { GetHiddenItems(child, ref hashs); } }