public ProjectRootNode(ProjectManager manager, ProjectInfo pi, FiledropsDirectory di, Binding showext) : base(di, showext) { this.pi = pi; this.manager = manager; Tag = "Project"; }
/// <summary> /// This constructor is used by the projectmanager /// </summary> /// <param name="accepteddirs"></param> /// <param name="filters"></param> /// <param name="manager"></param> /// <param name="hasPref"></param> public ProjectFileTree(string[] accepteddirs, string[] filters, ProjectManager manager, bool hasPref) { this.AcceptedDirs = accepteddirs; this.Filters = filters; this.Manager = manager; this.hasPref = hasPref; //Background = Brushes.LightSteelBlue; InitOtherMenus(); }
public ProjectInfo(FiledropsFile projectfile, ProjectManager manager, FiledropsFileSystem fs) { fs.GetFileIcon = this.GetFileIcon; fs.GetClosedDirIcon = this.GetClosedDirIcon; fs.GetOpenDirIcon = this.GetOpenDirIcon; fs.WorkingDirectory = projectfile.Parent; this.FileSystem = fs; projectfile.FileSystem = this.FileSystem; projectfile.Parent.FileSystem = this.FileSystem; this.ProjectFile = projectfile; this.Root = projectfile.Parent; _openfiles = new Dictionary<string, ProjectLayoutDocument>(); this.Manager = manager; }
public MainComponent(ProjectManager manager, string docuiconfig) { InitializeComponent(); this.initManager(manager, docuiconfig); XmlDocument root = new XmlDocument(); root.Load(manager.Assembly.GetManifestResourceStream(docuiconfig)); if (root.DocumentElement.SelectSingleNode("Solution") != null) { this.SolutionMenu.Visibility = System.Windows.Visibility.Visible; this.OpenProjectMenu.Visibility = System.Windows.Visibility.Collapsed; this.CloseProjectMenu.Visibility = System.Windows.Visibility.Collapsed; } this.manager = manager; managerpanel.Content = manager; manager.DocPane = this.DocumentContainer; //this.dockingManager.Theme = new AeroTheme(); //this.ApplyTheme("BureauBlue"); }
public SolutionProjectInfo(SolutionInfo solution, FiledropsFile projectfile, ProjectManager manager, FiledropsFileSystem fs) : base(projectfile, manager, fs) { this.solution = solution; }
private void initManager(ProjectManager manager, String config) { InitMenuIcons(); //var Assembly = Assembly.GetEntryAssembly(); var assembly = manager.Assembly; //load docui config XmlDocument doc = new XmlDocument(); //EmbeddedResourceTools.GetXmlDocument(config, assembly); doc.Load(assembly.GetManifestResourceStream(config)); XmlNode root = doc.DocumentElement; XmlNode componentsnode = root.SelectSingleNode("Components"); if (componentsnode != null && componentsnode.InnerText != "") { string components = componentsnode.InnerText; XmlDocument fdcompdoc = new XmlDocument(); string componentsstring = Environment.CurrentDirectory + components; fdcompdoc.Load(componentsstring); DynamicForm.InitComponents(fdcompdoc); } XmlNode currentNode = root; XmlNode solution = root.SelectSingleNode("Solution"); if (solution != null && solution.InnerText != "") { SolutionManager.solFolderIcon = this.fetchIconFromXml("FolderIcon", solution, 16, assembly); SolutionManager.solOpenFolderIcon = this.fetchIconFromXml("OpenFolderIcon", solution, 16, assembly); currentNode = solution; } XmlNode project = currentNode.SelectSingleNode("Project"); if (project != null && project.InnerText != "") { ProjectManager.projFolderIcon = this.fetchIconFromXml("FolderIcon", project, 16, assembly); ProjectManager.projOpenFolderIcon = this.fetchIconFromXml("OpenFolderIcon", project, 16, assembly); XmlNode prefnode = project.SelectSingleNode("Preferences"); if (prefnode != null) { ProjectManager.projFileIcon = this.fetchIconFromXml("FileIcon", prefnode, 16, assembly); ProjectManager.preferencesfile = prefnode.SelectSingleNode("SchemaName").InnerText; } XmlNode dirsnode = project.SelectSingleNode("Directories"); if (dirsnode != null) { XmlNodeList dirs = dirsnode.SelectNodes("Directory"); int size = dirs.Count; string[] accepted = new string[size]; string[] acceptedxts = new string[size]; string[] types = new string[size]; Dictionary<string, BitmapImage> openfoldericons = new Dictionary<string, BitmapImage>(); Dictionary<string, BitmapImage> closedfoldericons = new Dictionary<string, BitmapImage>(); Dictionary<string, BitmapImage> fileicons = new Dictionary<string, BitmapImage>(); List<string> noSchema = new List<string>(); int i = 0; foreach (XmlNode node in dirs) { try { accepted[i] = node.SelectSingleNode("Name").InnerText; acceptedxts[i] = node.SelectSingleNode("FileExtension").InnerText; types[i] = node.SelectSingleNode("Type").InnerText; XmlAttribute att = node.Attributes["NoSchema"]; if (att != null && att.InnerText == "true") { noSchema.Add(acceptedxts[i]); } BitmapImage img = fetchIconFromXml("OpenFolderIcon", node, 16, assembly); if (img != null) { openfoldericons.Add(acceptedxts[i], img); } img = fetchIconFromXml("FolderIcon", node, 16, assembly); if (img != null) { closedfoldericons.Add(acceptedxts[i], img); } img = fetchIconFromXml("FileIcon", node, 16, assembly); if (img != null) { fileicons.Add(acceptedxts[i], img); } i++; } catch (NullReferenceException e) { //todo: solve this misconfig } } ProjectManager.ACCEPTED = accepted; ProjectManager.ACCEPTEDXTS = acceptedxts; ProjectManager.TYPES = types; ProjectManager.NoSchema = noSchema; XmlNode projext = project.SelectSingleNode("FileExtension"); if (projext != null) { ProjectManager.PXT = projext.InnerText; } if (solution != null) { XmlNode solext = solution.SelectSingleNode("FileExtension"); if (solext != null) { SolutionManager.SXT = solext.InnerText; } } ProjectManager.CLOSEDFOLDER_ICONS = closedfoldericons; ProjectManager.OPENFOLDER_ICONS = openfoldericons; ProjectManager.FILE_ICONS = fileicons; } } //safely initialize the tree manager.initTree(); }