DroidExplorer.Core.UI.CConsole.ConsoleControl.WriteOutput C# (CSharp) Method

WriteOutput() public method

Writes the output to the console control.
public WriteOutput ( string output, Color color ) : void
output string The output.
color Color The color.
return void
        public void WriteOutput(string output, Color color)
        {
            try {
                if(!this.IsHandleCreated || this.IsDisposed || this._isDisposed)
                    return;
                Invoke((Action)(() => {

                    if(this.IsDisposed || !this.IsHandleCreated || this._isDisposed) {
                        return;
                    }

                    if(string.IsNullOrEmpty(lastInput) == false &&
                            (output == lastInput || output.Replace("\r\n", "") == lastInput)) {
                        return;
                    }

                    //  Write the output.
                    richTextBoxConsole.SelectionColor = color;
                    richTextBoxConsole.SelectedText += output.REReplace("[\r]{1,}\n?", Environment.NewLine);
                    InputStart = richTextBoxConsole.SelectionStart;

                    Imports.SendMessage(richTextBoxConsole.Handle, Imports.WmVscroll, Imports.SbBottom, 0x0);

                }));
            } catch(ObjectDisposedException odex) {
                // I don't know why it keeps throwing this but it does.
            }
        }

Same methods

ConsoleControl::WriteOutput ( string output ) : void