/// <summary>
 /// Toggles the editors between batch mode and console mode.
 /// </summary>
 /// <param name="executionMode">The execution mode.</param>
 private void ToggleEditors(ExecutionModeOption executionMode)
 {
     try
     {
         panel1.SuspendLayout();
         if (executionMode == ExecutionModeOption.BatchMode)
         {
             panel1.Controls.Remove(BaseShellConsoleEditor);
             panel1.Controls.Add(ResultsTabControl);
             panel1.Controls.Add(splitter1);
             // Register the code editor, to add back its handles and events
             CodeEditor.RegisterEditor();
             panel1.Controls.Add(CodeEditor);
             RunScriptToolStripButton.Enabled = true;
             CodeEditor.Focus();
         }
         else
         {
             panel1.Controls.Remove(ResultsTabControl);
             panel1.Controls.Remove(splitter1);
             // Unregister the code editor, to remove its handles and events
             CodeEditor.UnregisterEditor();
             panel1.Controls.Remove(CodeEditor);
             BaseShellConsoleEditor.Dock = DockStyle.Fill;
             panel1.Controls.Add(BaseShellConsoleEditor);
             RunScriptToolStripButton.Enabled = false;
             BaseShellConsoleEditor.Focus();
         }
     }
     finally
     {
         panel1.ResumeLayout();
     }
 }
        /// <summary>
        /// Executes the script in console mode.
        /// </summary>
        /// <param name="script">The script.</param>
        private void ExecuteConsoleScript(string script)
        {
            var jsonString  = _mySqlXProxy.ExecuteQuery(script, ScriptLanguageType);
            var boxedResult = ExtensionMethods.ToBaseShellResultObject(jsonString);

            PrintResult(script, boxedResult);
            BaseShellConsoleEditor.Focus();
        }