private void menuRun_Click(object sender, EventArgs e) { FrmLuaEditor editor; if (tabStrip1.SelectedTab == null || (editor = tabStrip1.SelectedTab.AttachedControl as FrmLuaEditor) == null) { return; } try { lua.DoString(editor.CodeContent); } catch (NLua.Exceptions.LuaScriptException ex) { env.WriteLine(ex); if (ex.IsNetException && ex.InnerException != null) { env.WriteLine(ex.InnerException); } } catch (Exception ex) { env.WriteLine(ex); } }
private void menuRun_Click(object sender, EventArgs e) { FrmLuaEditor editor; if (tabStrip1.SelectedTab == null || (editor = tabStrip1.SelectedTab.AttachedControl as FrmLuaEditor) == null) { return; } try { lua.DoString(editor.CodeContent); } catch (Exception ex) { env.WriteLine(ex.Message); } }