public SolutionProjectRootNode(SolutionManager manager, SolutionProjectInfo pi, FiledropsDirectory di, Binding showext, FolderTreeNodeFilter filter)
     : base(manager, pi, di, showext)
 {
     this.filter = filter;
     this.pi = pi;
     this.manager = manager;
 }
示例#2
0
 public FolderTreeNode GetTreeNodeWithProject(SolutionProjectInfo spi)
 {
     foreach (object n in this.solutionTree.Items)
     {
         if (n != null
             && n is IProjectNode
             && (n as IProjectNode).GetProject().ProjectFile.FullName.Equals(spi.ProjectFile.FullName))
         {
             return n as FolderTreeNode;
         }
     }
     return null;
 }
示例#3
0
 public void initSolutionProject(FiledropsFile f, FiledropsFileSystem fs)
 {
     SolutionProjectInfo spi = new SolutionProjectInfo(this, f, Manager, fs);
     initSolutionProject(spi);
 }
示例#4
0
 public void initSolutionProject(SolutionProjectInfo spi)
 {
     projects.Add(spi.ProjectFile.Parent.Name, spi);
 }
示例#5
0
        public void addProject(SolutionProjectInfo spi)
        {
            // Initialize this project
            initSolutionProject(spi);

            AddProjectToSolutionFile(spi.ProjectFile);
        }
示例#6
0
        public void closeProject(SolutionProjectInfo pi)
        {
            FiledropsFile f = pi.ProjectFile;
            if (projects.ContainsKey(f.NameWithoutExtension) && pi.CloseProject())
            {
                projects.Remove(f.NameWithoutExtension);

                // Remove this project from the .fdsln file
                XmlDocument doc = new XmlDocument();
                doc.Load(Solutionfile.FullName);
                XmlNode root = doc.DocumentElement;

                foreach (XmlNode node in root.SelectNodes("Project"))
                {
                    if (node.SelectSingleNode("Location").InnerText.Equals(pi.ProjectFile.FullName))
                    {
                        root.RemoveChild(node);
                        break;
                    }
                }

                Solutionfile.Create(doc.OuterXml);
            }
        }