internal TypeTreeNode GetTypeNode(Type t) { String ns = t.Namespace; bool isNestedType = (t.MemberType == MemberTypes.NestedType); ExpandNode(); foreach (ModuleTreeNode modNode in LogicalNodes) { modNode.ExpandNode(); foreach (NamespaceTreeNode nameNode in modNode.LogicalNodes) { if (nameNode.Namespace.Equals(ns) || (ns == null && nameNode.Namespace.Equals(""))) { nameNode.ExpandNode(); foreach (TypeTreeNode typeNode in nameNode.LogicalNodes) { if (typeNode.Type.Equals(t)) { return(typeNode); } else if (isNestedType) { TypeTreeNode nestedNode = (TypeTreeNode)typeNode.FindMemberNode (t, TypeTreeNode.FIND_NESTED); if (nestedNode != null) { return(nestedNode); } } } break; } } } return(null); }