private static void ExpandValuePath(TreeView treeView, string valuePath)
{
if (treeView == null) return;
if (valuePath == null) return;
if (valuePath.Length > 0)
{
TreeNode treeNode;
treeNode = treeView.FindNode(valuePath);
if (treeNode != null)
{
if (
(treeNode.Expanded == null)
|| (treeNode.Expanded.Equals(false))
)
{
treeNode.Expand();
log.Debug("Expanded treeNode found for value path " + valuePath);
}
}
else
{
log.Debug(" treeNode was null for " + valuePath);
}
}
}