public void FormKeyAction(ScriptWindowActionId id) { if (InvokeRequired) { Invoke((FormKeyActionHandler)FormKeyAction, id); return; } switch (id) { case ScriptWindowActionId.FormExit: Hide(); FormUiManager.MainFrameMenuBarUpdate(); break; case ScriptWindowActionId.OpenScriptDirectory: System.Diagnostics.Process.Start(GetScriptRootPath()); break; } if (DockPanel_Main.GetActiveDocumentControl() is ScriptWindow_CodeEditor editor) { editor.FormKeyAction(id); } }
public void FormKeyAction(ScriptWindowActionId id) { if (InvokeRequired) { Invoke((FormKeyActionHandler)FormKeyAction, id); return; } switch (id) { case ScriptWindowActionId.ScriptRun: ScriptRun(); break; case ScriptWindowActionId.ScriptStop: ScriptStop(); break; } }