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.Group.Name); var context = new CommandContext(parent, string.Format("{0:X8}.{1}", tag.Index, groupName)); return context; }
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; }
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; }
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; }
public ExtractCommand(VFilesList definition) : 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.") { Definition = definition; }