Ejemplo n.º 1
0
        /// <summary>
        /// Returns an array of NodeInfo entries that exist beneath the specified NodeInfo.
        /// </summary>
        public override NodeInfo[] GetChildNodes(NodeInfo info)
        {
            List <NodeInfo> children = new List <NodeInfo>();

            children.Add(new NodeInfo(ParentSource.GetNodeType <EssentialTagsRoot>(), "Essential Tags"));
            return(children.ToArray());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructs the parent NodeInfo based on the values in the supplied NodeInfo.
        /// </summary>
        public override NodeInfo GetParentNodeInfo(NodeInfo info)
        {
            NodeInfo newInfo = new NodeInfo(ParentSource.GetNodeType <ScenarioFileNodeType>(),
                                            info.Identifier.Remove(info.Identifier.IndexOf('|')));

            return(newInfo);
        }
        /// <summary>
        /// Constructs the parent NodeInfo based on the values in the supplied NodeInfo.
        /// </summary>
        public override NodeInfo GetParentNodeInfo(NodeInfo info)
        {
            NodeInfo newInfo = new NodeInfo(
                ParentSource.GetNodeType <UnextractedFolderNodeType>(), Path.GetDirectoryName(info.Identifier));

            return(newInfo);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Constructs the parent NodeInfo based on the values in the supplied NodeInfo.
        /// </summary>
        public override NodeInfo GetParentNodeInfo(NodeInfo info)
        {
            TagArchiveObjectViewNodeSource source = (TagArchiveObjectViewNodeSource)ParentSource;
            string   groupName  = source.GetHLTGroupFromFilename(info.Identifier);
            NodeInfo parentInfo = new NodeInfo(ParentSource.GetNodeType <UnextractedHLTGroupNodeType>(), groupName);

            return(parentInfo);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Returns an array of NodeInfo entries that exist beneath the specified NodeInfo.
        /// </summary>
        public override NodeInfo[] GetChildNodes(NodeInfo info)
        {
            List <NodeInfo> children = new List <NodeInfo>();

            children.Add(new NodeInfo(ParentSource.GetNodeType <PropertiesRootNodeType>(), "properties"));
            children.AddRange(base.GetChildNodes(info));
            children.Add(new NodeInfo(ParentSource.GetNodeType <RecycleBinRootNodeType>(), "recyclebin"));
            return(children.ToArray());
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Constructs the parent NodeInfo based on the values in the supplied NodeInfo.
        /// </summary>
        public override NodeInfo GetParentNodeInfo(NodeInfo info)
        {
            string   parentPath = Path.GetDirectoryName(info.Identifier).Trim('\\');
            NodeInfo newInfo;

            if (parentPath == "")
            {
                newInfo = new NodeInfo(ParentSource.GetNodeType <RootNodeType>(), parentPath);
            }
            else
            {
                newInfo = new NodeInfo(ParentSource.GetNodeType <FolderNodeType>(), parentPath);
            }
            return(newInfo);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Returns an array of NodeInfo entries that exist beneath the specified NodeInfo.
        /// </summary>
        public override NodeInfo[] GetChildNodes(NodeInfo info)
        {
            List <NodeInfo>      children = new List <NodeInfo>();
            TagArchiveNodeSource source   = (TagArchiveNodeSource)ParentSource;

            TagPath tagPath = new TagPath(info.Identifier, source.Game.GameID, TagLocation.Archive);
            TagFile file    = Core.Prometheus.Instance.Pool.GetTagFile(tagPath);

            foreach (string attachment in file.Attachments)
            {
                NodeInfo attachmentInfo = new NodeInfo(ParentSource.GetNodeType <AttachedScriptNodeType>(),
                                                       info.Identifier + "|" + attachment);
                children.Add(attachmentInfo);
            }
            return(children.ToArray());
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Returns an array of NodeInfo entries that exist beneath the specified NodeInfo.
        /// </summary>
        public override NodeInfo[] GetChildNodes(NodeInfo info)
        {
            List <NodeInfo> children = new List <NodeInfo>();
            TagArchiveObjectViewNodeSource source = (TagArchiveObjectViewNodeSource)ParentSource;

            foreach (string group in source.Game.TypeTable.HighLevelTypeGroups)
            {
                foreach (TypeTableEntry entry in source.Game.TypeTable.GetHighLevelTypes(group))
                {
                    if (source.Library.MissingFilesArchive.FileTypeExists(entry.FullName))
                    {
                        children.Add(new NodeInfo(ParentSource.GetNodeType <UnextractedHLTGroupNodeType>(), "[" + group + "]"));
                        break;
                    }
                }
            }
            return(children.ToArray());
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Returns an array of NodeInfo entries that exist beneath the specified NodeInfo.
        /// </summary>
        public override NodeInfo[] GetChildNodes(NodeInfo info)
        {
            List <NodeInfo> children = new List <NodeInfo>();
            TagArchiveObjectViewNodeSource source = (TagArchiveObjectViewNodeSource)ParentSource;

            string group = info.Identifier.Trim('[', ']');

            foreach (TypeTableEntry entry in source.Game.TypeTable.GetHighLevelTypes(group))
            {
                // Get a list of the tags that match the HLT supplied inside the brackets.
                string[] files = (source.Library.MissingFilesArchive.GetFileList("", entry.FullName, true));
                foreach (string file in files)
                {
                    NodeInfo child = new NodeInfo(ParentSource.GetNodeType <UnextractedHLTNodeType>(), file.Trim('\\'));
                    children.Add(child);
                }
            }
            return(children.ToArray());
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Returns an array of NodeInfo entries that exist beneath the specified NodeInfo.
        /// </summary>
        public override NodeInfo[] GetChildNodes(NodeInfo info)
        {
            List <NodeInfo> children = new List <NodeInfo>();
            TagArchiveObjectViewNodeSource source = (TagArchiveObjectViewNodeSource)ParentSource;

            foreach (string group in source.Game.TypeTable.HighLevelTypeGroups)
            {
                bool itemExists = false;
                foreach (TypeTableEntry entry in source.Game.TypeTable.GetHighLevelTypes(group))
                {
                    if (source.Library.FileTypeExists(entry.FullName))
                    {
                        itemExists = true;
                    }
                }
                if (!itemExists)
                {
                    continue;
                }
                children.Add(new NodeInfo(ParentSource.GetNodeType <HLTGroupNodeType>(), "[" + group + "]"));
            }
            return(children.ToArray());
        }
Ejemplo n.º 11
0
 /// <summary>
 /// Constructs the parent NodeInfo based on the values in the supplied NodeInfo.
 /// </summary>
 public override NodeInfo GetParentNodeInfo(NodeInfo info)
 {
     return(new NodeInfo(ParentSource.GetNodeType <PropertiesRootNodeType>(), "Properties"));
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Constructs the parent NodeInfo based on the values in the supplied NodeInfo.
 /// </summary>
 public override NodeInfo GetParentNodeInfo(NodeInfo info)
 {
     return(new NodeInfo(ParentSource.GetNodeType <UnextractedObjectViewRootNodeType>(), ""));
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Constructs the parent NodeInfo based on the values in the supplied NodeInfo.
 /// </summary>
 public override NodeInfo GetParentNodeInfo(NodeInfo info)
 {
     return(new NodeInfo(ParentSource.GetNodeType <EssentialTagsRoot>(), "Essential Tags"));
 }