Beispiel #1
0
        static void Main(string[] args)
        {
            if (args.Length != 3)
            {
                PrintUsage();
                return;
            }

            if (!Directory.Exists(args[1]))
            {
                Console.WriteLine("指定的路径不存在");
                return;
            }
            string[] all = GetAllCL3Files(new DirectoryInfo(args[1]));

            switch (args[0].ToLower())
            {
            case "e":
                foreach (var es in all)
                {
                    MainProcessor proc = new MainProcessor(new FileInfo(es), args[2].ToLower().Equals("s"));
                    proc.ExtractText();
                }
                break;

            case "i":
                foreach (var ims in all)
                {
                    MainProcessor proc = new MainProcessor(new FileInfo(ims), args[2].ToLower().Equals("s"));
                    proc.ImportText();
                }
                break;
            }

            Console.WriteLine("处理完成\r\n按任意键退出");
            Console.ReadKey();
        }
        static void Main(string[] args)
        {
            if (args.Length != 3)
            {
                PrintUsage();
                return;
            }

            if (!Directory.Exists(args[1]))
            {
                Console.WriteLine("指定的路径不存在");
                return;
            }
            string[] all = GetAllCL3Files(new DirectoryInfo(args[1]));

            switch (args[0].ToLower())
            {
                case "e":
                    foreach (var es in all)
                    {
                        MainProcessor proc = new MainProcessor(new FileInfo(es), args[2].ToLower().Equals("s"));
                        proc.ExtractText();
                    }
                    break;
                case "i":
                    foreach (var ims in all)
                    {
                        MainProcessor proc = new MainProcessor(new FileInfo(ims), args[2].ToLower().Equals("s"));
                        proc.ImportText();
                    }
                    break;
            }

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