private void btn_scr_Click(object sender, EventArgs e) { mk = new ShuaLua("./Script/" + comboBox2.SelectedItem.ToString(), WriteLog); mk.onFinished += (a, b) => { this.Invoke((MethodInvoker)(() => { button4.Enabled = true; Change_Enable(true); button5.Enabled = button6.Enabled = false; })); }; ShuaLua sl = (ShuaLua)mk; sl.SetLable = (a) => { this.Invoke((MethodInvoker)(() => { lbl_rest.Text = a.ToString(); })); }; sl.ShowMsg = (a) => { this.Invoke((MethodInvoker)(() => { MessageBox.Show(a); })); }; button5.Enabled = button6.Enabled = true; button4.Enabled = false; Change_Enable(false); mk.Start(); }
public void RegistFunc(Game gm, ShuaLua shua) { _Gm = gm; _Shua = shua; _lua.BindLuaApiClass(this); }