public static void Populate(CommandContext context, OpenTagCache info, TagInstance tag, VFilesList vfsl)
 {
     context.AddCommand(new ListCommand(vfsl));
     context.AddCommand(new ExtractCommand(vfsl));
     context.AddCommand(new ExtractAllCommand(vfsl));
     context.AddCommand(new ImportCommand(info, tag, vfsl));
     context.AddCommand(new ImportAllCommand(info, tag, vfsl));
 }
        public static CommandContext Create(CommandContext parent, OpenTagCache info, TagInstance tag, VFilesList vfsl)
        {
            var groupName = info.StringIds.GetString(tag.GroupName);

            var context = new CommandContext(parent,
                string.Format("{0:X8}.{1}", tag.Index, groupName));

            return context;
        }
 public static CommandContext Create(CommandContext parent, FileInfo fileInfo, TagCache cache, HaloTag tag, VFilesList vfsl)
 {
     var context = new CommandContext(parent, string.Format("{0:X8}.vfsl", tag.Index));
     context.AddCommand(new VfslListCommand(vfsl));
     context.AddCommand(new VfslExtractCommand(vfsl));
     context.AddCommand(new VfslExtractAllCommand(vfsl));
     context.AddCommand(new VfslImportCommand(fileInfo, cache, tag, vfsl));
     context.AddCommand(new VfslImportAllCommand(fileInfo, cache, tag, vfsl));
     return context;
 }
        public VfslListCommand(VFilesList list)
            : base(CommandFlags.Inherit,

			"list",
			"List files stored in the tag",

			"list [filter]",

			"If a filter is specified, only files which contain the filter in their path\n" +
			"will be listed.")
        {
            _list = list;
        }
        public ExtractAllCommand(VFilesList definition) : base(
            CommandFlags.Inherit,

            "extractall",
            "Extract all files from the tag",

            "extractall [output path]",

            "If not output path is specified, files will be extracted to the current\n" +
            "directory.")
        {
            Definition = definition;
        }
Пример #6
0
        public ListCommand(VFilesList definition) : base(
            CommandFlags.Inherit,

            "list",
            "List files stored in the tag",

            "list [filter]",

            "If a filter is specified, only files which contain the filter in their path\n" +
            "will be listed.")
        {
            Definition = definition;
        }
Пример #7
0
        public ImportCommand(OpenTagCache info, TagInstance tag, VFilesList definition) : base(
            CommandFlags.None,
            
            "import",
            "Replace a file stored in the tag",

            "import <virtual path> [filename]",
            
            "Replaces a file stored in the tag. The tag will be resized as necessary.")
        {
            Info = info;
            Tag = tag;
            Definition = definition;
        }
Пример #8
0
        public VfslImportCommand(OpenTagCache info, HaloTag tag, VFilesList list)
            : base(CommandFlags.None,
			
			"import",
			"Replace a file stored in the tag",

			"import <virtual path> [filename]",
			
			"Replaces a file stored in the tag. The tag will be resized as necessary.")
        {
            _info = info;
            _tag = tag;
            _list = list;
        }
        public VfslExtractCommand(VFilesList list)
            : base(CommandFlags.Inherit,

			"extract",
			"Extract a file from the tag",

			"extract <virtual path> [output path]",

			"Extracts a file stored in the tag. If the output path is not specified, it will\n" +
			"be the same as the file's virtual path.\n" +
			"\n" +
			"Use \"list\" to find files in the tag.")
        {
            _list = list;
        }
        public VfslImportAllCommand(OpenTagCache info, HaloTag tag, VFilesList list)
            : base(CommandFlags.None,
			
			"importall",
			"Replace all files stored in the tag",

			"importall [directory]",
			
			"Replaces all file stored in the tag. The tag will be resized as necessary.\n" +
			"If no directory is specified, files will be loaded from the current directory.")
        {
            _info = info;
            _tag = tag;
            _list = list;
        }
Пример #11
0
        public ImportAllCommand(OpenTagCache info, TagInstance tag, VFilesList definition) : base(
            CommandFlags.None,
            
            "importall",
            "Replace all files stored in the tag",

            "importall [directory]",
            
            "Replaces all file stored in the tag. The tag will be resized as necessary.\n" +
            "If no directory is specified, files will be loaded from the current directory.")
        {
            Info = info;
            Tag = tag;
            Definition = definition;
        }