Example #1
0
 public TextBoxAppender(RichTextBox textbox) {
     this._textBox = textbox;
     WriteLog = (msg, level) => {
         try {
             if (_screentextLength > 0xFFFF) {
                 _textBox.Clear();
                 _screentextLength = 0;
             }
             _textBox.SelectionColor = _logColors[level.Value / 10000 - 4];
             _textBox.AppendText(msg);
             _screentextLength += msg.Length;
         } catch { }
     };
 }
Example #2
0
 public TextBoxAppender(RichTextBox textbox)
 {
     this._textBox = textbox;
     WriteLog      = (msg, level) => {
         try {
             if (_screentextLength > 0xFFFF)
             {
                 _textBox.Clear();
                 _screentextLength = 0;
             }
             _textBox.SelectionColor = _logColors[level.Value / 10000 - 4];
             _textBox.AppendText(msg);
             _screentextLength += msg.Length;
         } catch { }
     };
 }