private void reloadRuntime_Click(object sender, EventArgs e) { try { var globalTimeout = this.runtimeTimeout.Text; var intTimeout = 0; int.TryParse(globalTimeout, out intTimeout); manager.Dispose(); manager = new RuntimeManager(new ManualManagerSettings { ScriptTimeoutMilliSeconds = intTimeout }); JavaScript.Manager.Tabris.Tabris.Register(manager.RequireManager, new JavaScript.Manager.Tabris.TabrisOptions { LogExecutor = new WinformLogExcutor(logAction) }); if (intTimeout > 0) { logAction(LogLevel.INFO, "重新加载运行时成功,全局ScriptTimeoutMilliSeconds设置为:" + intTimeout, ""); } else { logAction(LogLevel.INFO, "重新加载运行时成功", ""); } } catch (Exception ex) { logAction(LogLevel.ERROR, "重新加载运行时失败", ex.Message); } }