Example #1
0
            public void Write(string text, Style style)
            {
                switch (style)
                {
                case Style.Error:
                    _control.WriteErrorString(text);
                    break;

                case Style.Out:
                    _control.WriteOutputString(text);
                    break;

                case Style.Warning:
                    _control.WriteErrorString(text);
                    break;

                case Style.Prompt:
                    _control.SetPrompt(text);
                    break;
                }
            }
Example #2
0
            public override void Write(char value)
            {
                _builder.Append(value);

                if (value == '\n')
                {
                    if (_error)
                    {
                        _control.WriteErrorString(_builder.ToString());
                    }
                    else
                    {
                        _control.WriteOutputString(_builder.ToString());
                    }
                    _builder.Clear();
                }
            }