123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Windows.Forms;
- namespace ToolsMPQ
- {
- static class Program
- {
- /// <summary>
- /// 应用程序的主入口点。
- /// </summary>
- [STAThread]
- static void Main(params string[] args)
- {
- if (args.Length > 0)
- {
- if (Directory.Exists(args[0]))
- {
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new FormArchive(new DirectoryInfo(args[0])));
- return;
- }
- else if (File.Exists(args[0]) && args[0].ToLower().EndsWith(".mpq"))
- {
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new FormUnarchive(new FileInfo(args[0])));
- return;
- }
- }
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new FormMain());
- }
- }
- }
|