2 using System.Collections.Generic;
\r
5 using System.Windows.Forms;
\r
12 /// アプリケーションのメイン エントリ ポイントです。
\r
15 static int Main(string[] args)
\r
17 if (args.Length != 0)
\r
23 string tsoref = null;
\r
25 foreach (string i in args)
\r
27 string o = i.ToLower();
\r
32 if (o.StartsWith("-tso:")) tso = o.Substring(5).Trim('\r', '\n');
\r
33 else if (o.StartsWith("-mqo:")) mqo = o.Substring(5).Trim('\r', '\n');
\r
34 else if (o.StartsWith("-ref:")) tsoref = o.Substring(5).Trim('\r', '\n');
\r
35 else throw new ArgumentException("Invalid option: " + i);
\r
40 TSOGeneratorConfig config = new TSOGeneratorConfig();
\r
42 config.ShowMaterials = false;
\r
43 TSOGeneratorRefBone gen = new TSOGeneratorRefBone(config);
\r
45 if (mqo == null) throw new ArgumentException("「-mso:ファイル名」の形式で入力Mqoファイル名を指定してください");
\r
46 if (tso == null) throw new ArgumentException("「-tso:ファイル名」の形式で出力Tsoファイル名を指定してください");
\r
47 if (tsoref == null) throw new ArgumentException("「-ref:ファイル名」の形式で参照Tsoファイル名を指定してください");
\r
49 gen.Generate(mqo, tsoref, tso);
\r
51 catch (ArgumentException e)
\r
53 System.Diagnostics.Debug.WriteLine(e.Message);
\r
54 System.Console.Out.WriteLine(e.Message);
\r
55 System.Console.Out.Flush();
\r
60 System.Diagnostics.Debug.WriteLine(e.Message);
\r
61 System.Console.Out.WriteLine(e.Message);
\r
62 System.Console.Out.Flush();
\r
69 Application.EnableVisualStyles();
\r
70 Application.SetCompatibleTextRenderingDefault(false);
\r
71 Application.Run(new Form1());
\r