/// <summary> /// 按钮:编译输出 /// </summary> private void button3_Click(object sender, EventArgs e) { if (!Regex.IsMatch(this.textBox2.Text, "^[a-zA-Z]{8}$")) { MessageBox.Show(@"工程密钥必须是半角英文字母,8位长度"); return; } if (this.textBox1.Text.Trim() == String.Empty) { MessageBox.Show(@"工程名不能为空"); return; } var beginStamp = DateTime.Now; CLIAdapter.BeginCompile(this.textBox1.Text.Trim(), this.workPath, this.outPath, this.textBox2.Text, this.checkBox1.Checked); Console.WriteLine(); Console.WriteLine(@"Time Cost: {0} ms", (DateTime.Now - beginStamp).TotalMilliseconds); MessageBox.Show(@"Successfully Compiled."); this.button4.Enabled = true; }
public static void Main(string[] args) { // CLI if (args.Length > 0) { CLIAdapter.ParseArgs(args); var beginStamp = DateTime.Now; CLIAdapter.BeginCompile( Program.NullServer(CLIAdapter.Get("p"), "YuriProject"), Program.ParseURItoURL(Program.NullServer(CLIAdapter.Get("d"), String.Empty)), Program.ParseURItoURL(Program.NullServer(CLIAdapter.Get("o"), "main.sil")), Program.NullServer(CLIAdapter.Get("key"), "yurayuri"), Program.NullServer(CLIAdapter.Get("e"), "true").ToLower() == "true" ); Console.WriteLine(); Console.WriteLine(@"Time Cost: {0} ms", (DateTime.Now - beginStamp).TotalMilliseconds); } // GUI else { new CPMainForm().ShowDialog(); } }