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
21 //bool bImport= false, bExport= false;
\r
22 //bool bMakeSub= false, bCopyTSO= false;
\r
23 //bool bBoneAuto= false;
\r
28 foreach(string i in args)
\r
30 string o = i.ToLower();
\r
34 //case "-i": bImport = true; break;
\r
35 //case "-e": bExport = true; break;
\r
36 //case "-s": bMakeSub = true; break;
\r
37 //case "-c": bCopyTSO = true; break;
\r
38 //case "-ba": bBoneAuto= true; break;
\r
40 if(o.StartsWith("-tso:")) tso = o.Substring(5).Trim('\r', '\n');
\r
41 else if(o.StartsWith("-mqo:")) mqo = o.Substring(5).Trim('\r', '\n');
\r
42 else if(o.StartsWith("-ref:")) rtso= o.Substring(5).Trim('\r', '\n');
\r
43 else throw new ArgumentException("Invalid option: " + i);
\r
48 TSOGenerator gen = new TSOGenerator();
\r
49 TSOGenerateConfig config = new TSOGenerateConfig();
\r
51 config.materialconfig = false;
\r
53 if(mqo == null) throw new ArgumentException("「-mso:ファイル名」の形式で入力Mqoファイル名を指定してください");
\r
54 if(tso == null) throw new ArgumentException("「-tso:ファイル名」の形式で出力Tsoファイル名を指定してください");
\r
55 if(rtso == null) throw new ArgumentException("「-ref:ファイル名」の形式で参照Tsoファイル名を指定してください");
\r
57 gen.GenerateAutoBone(mqo, rtso, tso, config);
\r
58 } catch(ArgumentException e)
\r
60 System.Diagnostics.Debug.WriteLine(e.Message);
\r
61 System.Console.Out.WriteLine(e.Message);
\r
62 System.Console.Out.Flush();
\r
64 } catch(Exception e)
\r
66 System.Diagnostics.Debug.WriteLine(e.Message);
\r
67 System.Console.Out.WriteLine(e.Message);
\r
68 System.Console.Out.Flush();
\r
75 Application.EnableVisualStyles();
\r
76 Application.SetCompatibleTextRenderingDefault(false);
\r
77 Application.Run(new Form1());
\r