void UnsetExpandStates (TreeNodeCollection col, string[] states)
{
foreach (TreeNode node in col) {
if (node.Expanded.HasValue && node.Expanded.Value) {
bool expand = (Array.IndexOf (states, node.Path) != -1);
if (!expand) node.Expanded = false;
}
if (node.HasChildData)
UnsetExpandStates (node.ChildNodes, states);
}
}