private void MenuBar_Script_Stop_Click(object sender, EventArgs e) { if (DockPanel_Main.GetActiveDocumentControl() is ScriptWindow_CodeEditor editor) { editor.ScriptStop(); } }
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); } }
private void UpdateCurrentEditorStatus() { var editor = DockPanel_Main.GetActiveDocumentControl() as ScriptWindow_CodeEditor; UpdateEditorCursorStatus(editor); UpdateEditorScriptStatus(editor); }
private string GetCurrentScript() { if (DockPanel_Main.GetActiveDocumentControl() is CodeEditorEx dock) { return(dock.Text); } else { return(null); } }
private void OnScriptMessageOutput(object sender, ScriptMessageData msg) { if (InvokeRequired) { Invoke((ScriptMessageAppendedHandler)OnScriptMessageOutput, sender, msg); return; } if (sender == (DockPanel_Main.GetActiveDocumentControl() as CodeEditorEx)) { DC_Console.AddMessage(msg); } }
private void OnScriptMessageClear(object sender, EventArgs e) { if (InvokeRequired) { Invoke((EventHandler)OnScriptMessageClear, sender, e); return; } if (sender == (DockPanel_Main.GetActiveDocumentControl() as CodeEditorEx)) { DC_Console.ClearMessage(); } }