public void OpenRecource(string filename, bool expand) { if (!String.IsNullOrEmpty(filename)) { RootNode rootNode = this.CreateRootNode(this, filename); ResourceType[] types = rootNode.ResourcesLocator.GetTypes(); foreach (ResourceType type in types) { // Don't add these types to the list! if (type.Type == ResourceTypes.RT_ICON || type.Type == ResourceTypes.RT_CURSOR) { continue; } TypeNode typeNode = this.CreateTypeNode(rootNode, type); ResourceValue[] values = rootNode.ResourcesLocator.GetValues(type); foreach (ResourceValue value in values) { ValueNode valueNode = this.CreateValueNode(typeNode, value); valueNode.Adjust(rootNode.ResourcesLocator, type); } } if (expand) { rootNode.Expand(); } this.SelectedNode = rootNode; this.LastLoadedFile = filename; } }