/// <summary> /// Returns an array of NodeInfo entries that exist beneath the specified NodeInfo. /// </summary> public override NodeInfo[] GetChildNodes(NodeInfo info) { ProjectNodeSource source = (ProjectNodeSource)ParentSource; List <NodeInfo> children = new List <NodeInfo>(); // Referenced files/folders foreach (string folder in source.ProjectReferences.GetFolderList(info.Identifier)) { children.Add(new NodeInfo(source.GetNodeType <FolderNodeType>(), folder)); } foreach (string file in source.ProjectReferences.GetFileList(info.Identifier)) { NodeType nodeType = source.GetNodeType(file); children.Add(new NodeInfo(nodeType, file)); } foreach (string folder in source.ProjectFolder.GetFolderList(info.Identifier)) { children.Add(new NodeInfo(source.GetNodeType <FolderNodeType>(), folder)); } foreach (string file in source.ProjectFolder.GetFileList(info.Identifier)) { NodeType nodeType = source.GetNodeType(file); children.Add(new NodeInfo(nodeType, file)); } return(children.ToArray()); }
/// <summary> /// Returns an array of NodeInfo entries that exist beneath the specified NodeInfo. /// </summary> public override NodeInfo[] GetChildNodes(NodeInfo info) { ProjectNodeSource source = (ProjectNodeSource)ParentSource; List <NodeInfo> children = new List <NodeInfo>(); // Get a list of essential tags from the game definition. foreach (TemplateTag tag in source.ProjectManager.Project.Template.TagSet) { string element = tag.Name; if (source.TemplateTags.ContainsTemplateElement(element)) { NodeInfo childInfo = new NodeInfo(source.GetNodeType <ProjectTemplateTagNodeType>(), source.TemplateTags[element].Path); childInfo.Tag = element; children.Add(childInfo); } else { NodeInfo childInfo = new NodeInfo(source.GetNodeType <GlobalTemplateTagNodeType>(), tag.DefaultFile + "." + tag.FileType); childInfo.Tag = element; children.Add(childInfo); } } return(children.ToArray()); }
private void SourceChanged(object sender, LibraryFileActionArgs e) { NodeInfo info = new NodeInfo(projectSource.GetNodeType(e.Filename), e.Filename); bool state = DetermineState(info); UpdateSubscribers(e.Filename, state); }