示例#1
0
 public ResourceManager(string[] dt, LSFile ls)
 {
     Files   = new Dictionary <string, Tuple <LSEntry, ResourceEntry> >();
     DTFiles = dt;
     LS      = ls;
 }
示例#2
0
        private static void Main(string[] args)
        {
            if (args.Length >= 2)
            {
                try
                {
                    string[] options = args.Where(x => x.StartsWith("-")).ToArray();
                    args = args.Skip(options.Length).Take(args.Length - options.Length).ToArray();

                    if (options.Contains("-r", StringComparer.InvariantCultureIgnoreCase))
                    {
                        if (args.Length < 3)
                        {
                            PrintUsage();
                            return;
                        }

                        DtPaths = args.Take(args.Length - 2).ToArray();
                        string lspath = args[DtPaths.Length];
                        string patchFolder = args.Last();

                        lsFile = new LSFile(lspath);
                        PatchArchive("resource", patchFolder);
                        PatchArchive("resource(us_en)", patchFolder);
                        PatchArchive("resource(us_fr)", patchFolder);
                        PatchArchive("resource(us_sp)", patchFolder);
                        lsFile.WorkingSource.Close();
                        return;
                    }

                    else
                    {
                        DtPaths = args.Take(args.Length - 1).ToArray();
                        string lspath = args[DtPaths.Length];

                        lsFile = new LSFile(lspath);
                        Unpack_default("resource");
                        lsFile.WorkingSource.Close();
                        return;
                    }

                }
                catch (Exception x)
                {
                    Console.WriteLine(x.Message);
                    Logstream.WriteLine(x.Message);
                    throw;
                }
            }
            if (args.Length == 1)
                Unpack_update(args[0]);
            else
                PrintUsage();
        }