예제 #1
0
 private void MenuBar_Script_Stop_Click(object sender, EventArgs e)
 {
     if (DockPanel_Main.GetActiveDocumentControl() is ScriptWindow_CodeEditor editor)
     {
         editor.ScriptStop();
     }
 }
예제 #2
0
        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);
            }
        }
예제 #3
0
        private void UpdateCurrentEditorStatus()
        {
            var editor = DockPanel_Main.GetActiveDocumentControl() as ScriptWindow_CodeEditor;

            UpdateEditorCursorStatus(editor);
            UpdateEditorScriptStatus(editor);
        }
예제 #4
0
 private string GetCurrentScript()
 {
     if (DockPanel_Main.GetActiveDocumentControl() is CodeEditorEx dock)
     {
         return(dock.Text);
     }
     else
     {
         return(null);
     }
 }
예제 #5
0
        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);
            }
        }
예제 #6
0
        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();
            }
        }