private void loadProjects(TreeNode parent) { //TreeNode projectsNode = new TreeNode(); //projectsNode.Text = Properties.Resources.Projects; foreach (VSProject project in Main.CurrentSolution.Projects.Values) { ProjectTreeNode projectNode = new ProjectTreeNode(); projectNode.Project = project; projectNode.ImageIndex = getProjectImageIndex(project.Type); projectNode.SelectedImageIndex = projectNode.ImageIndex; projectNode.ContextMenuStrip = contextMenuProject; loadFileGroups(projectNode, project); treeView.Invoke((MethodInvoker)(() => parent.Nodes.Add(projectNode))); } //treeView.Invoke((MethodInvoker)(() => parent.Nodes.Add(projectsNode))); //treeView.Invoke((MethodInvoker)(() => projectsNode.Expand())); }