Exemplo n.º 1
0
        static void Main(string[] args)
        {
            if (args.Length != 2)
            {
                PrintUsage();
            }

            Hpk hpk = new Hpk();
            switch (args[0].ToLower())
            {
                case "u":
                    FileInfo file = new FileInfo(args[1]);
                    hpk.Unpack(file);
                    break;
                case "p":
                    DirectoryInfo directory = new DirectoryInfo(args[1]);
                    hpk.Pack(directory);
                    break;
                default:
                    PrintUsage();
                    break;
            }
            Console.WriteLine("处理完成\r\n按任意键退出");
            Console.ReadKey();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            if (args.Length != 2)
            {
                PrintUsage();
            }

            Hpk hpk = new Hpk();

            switch (args[0].ToLower())
            {
            case "u":
                FileInfo file = new FileInfo(args[1]);
                hpk.Unpack(file);
                break;

            case "p":
                DirectoryInfo directory = new DirectoryInfo(args[1]);
                hpk.Pack(directory);
                break;

            default:
                PrintUsage();
                break;
            }
            Console.WriteLine("处理完成\r\n按任意键退出");
            Console.ReadKey();
        }