private void project_ItemRemoved(object sender, ProjectItemEventArgs e) { RemoveProjectItemNode(e.ProjectItem); if (project.IsEmpty) { ModelNode node = new EmptyProjectNode(project); Nodes.Add(node); if (TreeView != null) { node.AfterInitialized(); } } }
private void AddProjectItemNodes(Project project) { if (project.IsEmpty) { ModelNode node = new EmptyProjectNode(project); Nodes.Add(node); if (TreeView != null) { node.AfterInitialized(); } } else { foreach (IProjectItem projectItem in project.Items) { AddProjectItemNode(projectItem); } } }