示例#1
0
 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();
         }
     }
 }
示例#2
0
 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);
         }
     }
 }