public ConsoleControl() {
// Initialize the component.
InitializeComponent();
this.DoubleBuffered = true;
this.SetStyle(ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.ResizeRedraw |
ControlStyles.ContainerControl |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.SupportsTransparentBackColor,
true);
// Show diagnostics disabled by default.
ShowDiagnostics = false;
// Input enabled by default.
//IsInputEnabled = true;
// Disable special commands by default.
SendKeyboardCommandsToProcess = true;
// Initialize the keymappings.
InitialiseKeyMappings();
// Handle process events.
processInterace.OnProcessOutput += new ProcessInterface.ProcessEventHanlder(processInterace_OnProcessOutput);
processInterace.OnProcessError += new ProcessInterface.ProcessEventHanlder(processInterace_OnProcessError);
processInterace.OnProcessInput += new ProcessInterface.ProcessEventHanlder(processInterace_OnProcessInput);
processInterace.OnProcessExit += new ProcessInterface.ProcessEventHanlder(processInterace_OnProcessExit);
// Wait for key down messages on the rich text box.
richTextBoxConsole.KeyDown += new KeyEventHandler(richTextBoxConsole_KeyDown);
richTextBoxConsole.MouseUp += richTextBoxConsole_MouseDown;
}