コード例 #1
0
ファイル: SolutionTree.cs プロジェクト: wind2006/resxmanager
        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()));
        }
コード例 #2
0
ファイル: SolutionTree.cs プロジェクト: dnstech/ResxManager
        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()));
        }