public SolutionRootNode(SolutionManager manager, SolutionInfo si, FiledropsDirectory di, Binding showext, FolderTreeNodeFilter filter = null) : base(di, showext, filter) { this.Solution = si; this.manager = manager; this.Tag = "Solution"; }
public FolderTreeNode GetTreeNodeWithSolution(SolutionInfo si) { foreach (object n in this.solutionTree.Items) { if (n != null && n is ISolutionNode && (n as ISolutionNode).getSolution().Solutionfile.FullName.Equals(si.Solutionfile.FullName)) { return n as FolderTreeNode; } } return null; }
public void addProjectToSolutionAndRename(FiledropsFile projectfile, SolutionInfo si) { SolutionRootNode solutionsRoot = null; foreach (ISolutionNode n in this.Items) { if (n.getSolution().Solutionfile.FullName.Equals(si.Solutionfile.FullName)) { solutionsRoot = n as SolutionRootNode; } } if (solutionsRoot != null) { FolderTreeNodeFilter filter = new FolderTreeNodeFilter(new string[] { }, accepteddirs.Keys.ToArray()); FolderTreeNode item = solutionsRoot.createFolderNode(projectfile.Parent, filter, false); //item.Tag = "TopFolder"; item.FontWeight = FontWeights.Normal; buildProjectFolder(item); solutionsRoot.Items.Add(item); item.RenameNode(); } }
public void addRootAndRename(FiledropsDirectory dir, SolutionInfo si) { FolderTreeNode node = new SolutionRootNode(Manager, si, dir, showExtBinding); this.RootDirectories.Add(node.Entry); this.buildFolderRoot(node); this.Items.Add(node); node.RenameNode(); }
public FolderTreeNode addRoot(FiledropsDirectory dir, SolutionInfo si) { FolderTreeNode node = new SolutionRootNode(Manager, si, dir, showExtBinding); this.RootDirectories.Add(node.Entry); this.buildFolderRoot(node); if (ShowRoot) { this.Items.Add(node); } return node; }
public SolutionProjectInfo(SolutionInfo solution, FiledropsFile projectfile, ProjectManager manager, FiledropsFileSystem fs) : base(projectfile, manager, fs) { this.solution = solution; }
public void renameSolution(string oldname, string newname, SolutionInfo si) { this.solutions.Remove(oldname); this.solutions.Add(newname, si); }
public void createNewSolution() { FiledropsFileSystem sfs = this.FileSystem.Clone<FiledropsFileSystem>(); System.Windows.Forms.FolderBrowserDialog dialog = new System.Windows.Forms.FolderBrowserDialog(); if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { FiledropsDirectory newdir = sfs.ConstructDirectoryRecursive(Path.Combine(dialog.SelectedPath, "Solution")); FiledropsFile solutionfile = sfs.ConstructFile(Path.Combine(newdir.FullName, newdir.Name + "." + SolutionManager.SXT)); solutionfile.Create(); sfs.WorkingDirectory = solutionfile.Parent; SolutionInfo si = new SolutionInfo(solutionfile, this, sfs); solutions.Add(solutionfile.FullName, si); solutionfile.Parent.FileSystem = sfs; solutionfile.FileSystem = sfs; solutionTree.addRootAndRename(solutionfile.Parent, si); } }
public void closeSolution(SolutionInfo si) { if (si != null) { FiledropsFile f = si.Solutionfile; if (solutions.ContainsKey(f.FullName) && si.closeSolution()) { solutions.Remove(f.FullName); foreach (TreeViewItem item in solutionTree.Items) { if ((item as SolutionRootNode).Entry == f.Parent) { solutionTree.Items.Remove(item); break; } } } } }
public void initSolution(FiledropsFile f) { FiledropsFileSystem sfs = this.FileSystem.Clone<FiledropsFileSystem>(); sfs.WorkingDirectory = f.Parent; f.Parent.FileSystem = sfs; f.FileSystem = sfs; SolutionInfo si = new SolutionInfo(f, this, sfs); solutions.Add(f.FullName, si); solutionTree.addRoot(f.Parent, si); }