/// <summary> /// Initializes a new instance of the <see cref="ConsoleControl"/> class. /// </summary> public ConsoleControl() { // Initialise the component. InitializeComponent(); DefaultForeColor = Color.FromArgb(0, 0, 192, 0); CaretColor = Color.FromArgb(0, 0, 192, 0); ErrorColor = Color.FromArgb(0, 192, 0, 0); OutputProcessor = new DefaultConsoleOutputProcessor(this); CaretSize = new Size(8, 16); CommandHistory = new List <string>(); HistoryIndex = -1; // Show diagnostics disabled by default. ShowDiagnostics = false; // Input enabled by default. IsInputEnabled = true; // Disable special commands by default. SendKeyboardCommandsToProcess = false; // Initialise the keymappings. InitialiseKeyMappings(); // Handle process events. processInterace.OnProcessOutput += processInterace_OnProcessOutput; processInterace.OnProcessError += processInterace_OnProcessError; processInterace.OnProcessInput += processInterace_OnProcessInput; processInterace.OnProcessExit += processInterace_OnProcessExit; // Wait for key down messages on the rich text box. richTextBoxConsole.KeyDown += richTextBoxConsole_KeyDown; richTextBoxConsole.MouseUp += richTextBoxConsole_MouseUp; richTextBoxConsole.MouseDown += richTextBoxConsole_MouseDown; richTextBoxConsole.HandleCreated += richTextBoxConsole_HandleCreated; richTextBoxConsole.GotFocus += richTextBoxConsole_GotFocus; richTextBoxConsole.SelectionChanged += richTextBoxConsole_SelectionChanged; }
/// <summary> /// Initializes a new instance of the <see cref="ConsoleControl"/> class. /// </summary> public ConsoleControl() { // Initialise the component. InitializeComponent(); DefaultForeColor = Color.FromArgb(0, 0, 192, 0); CaretColor = Color.FromArgb(0, 0, 192, 0); ErrorColor = Color.FromArgb(0, 192, 0, 0); OutputProcessor = new DefaultConsoleOutputProcessor(this); CaretSize = new Size(8, 16); CommandHistory = new List<string>(); HistoryIndex = -1; // Show diagnostics disabled by default. ShowDiagnostics = false; // Input enabled by default. IsInputEnabled = true; // Disable special commands by default. SendKeyboardCommandsToProcess = false; // Initialise the keymappings. InitialiseKeyMappings(); // Handle process events. processInterace.OnProcessOutput += processInterace_OnProcessOutput; processInterace.OnProcessError += processInterace_OnProcessError; processInterace.OnProcessInput += processInterace_OnProcessInput; processInterace.OnProcessExit += processInterace_OnProcessExit; // Wait for key down messages on the rich text box. richTextBoxConsole.KeyDown += richTextBoxConsole_KeyDown; richTextBoxConsole.MouseUp += richTextBoxConsole_MouseUp; richTextBoxConsole.MouseDown += richTextBoxConsole_MouseDown; richTextBoxConsole.HandleCreated += richTextBoxConsole_HandleCreated; richTextBoxConsole.GotFocus += richTextBoxConsole_GotFocus; richTextBoxConsole.SelectionChanged += richTextBoxConsole_SelectionChanged; }