private void BindEvents() { luaEditor.InsertCheck += Scintilla_InsertCheck; luaEditor.CharAdded += Scintilla_CharAdded; luaEditor.TextChanged += Scintilla_TextChanged; btnNewScript.Click += (s, a) => ClearEditor(); btnKillScript.Click += (s, a) => luaCoreCtrl.Kill(); btnStopScript.Click += (s, a) => luaCoreCtrl.Stop(); btnRunScript.Click += (s, a) => { var name = cboxScriptName.Text; luaCoreCtrl.Kill(); luaCoreCtrl.SetScriptName( string.IsNullOrEmpty(name) ? $"({I18N.Empty})" : name); luaCoreCtrl.ReplaceScript(luaEditor.Text); luaCoreCtrl.Start(); }; btnClearOutput.Click += (s, a) => { qLogger?.Reset(); }; btnDeleteScript.Click += (s, a) => { var scriptName = cboxScriptName.Text; if (string.IsNullOrEmpty(scriptName) || !VgcApis.Libs.UI.Confirm(I18N.ConfirmRemoveScript)) { return; } if (!luaServer.RemoveScriptByName(scriptName)) { VgcApis.Libs.UI.MsgBoxAsync("", I18N.ScriptNotFound); } }; btnSaveScript.Click += (s, a) => OnBtnSaveScriptClickHandler(true); cboxScriptName.DropDown += (s, a) => ReloadScriptName(); cboxScriptName.SelectedValueChanged += CboxScriptNameChangedHandler; }
public void Cleanup() { logUpdater?.Dispose(); formSearch?.Close(); luaCoreCtrl?.Kill(); qLogger?.Dispose(); }
public void Cleanup() { logUpdater?.Dispose(); formSearch?.Close(); luaCoreCtrl?.Kill(); qLogger?.Dispose(); if (luaAcm != null) { luaAcm.TargetControlWrapper = null; } luaEditor?.Dispose(); }