private void AppendTextToConsole(Object text)
 {
     // 让富文本框获取焦点
     RtxLog.Focus();
     // 设置光标的位置到文本结尾
     RtxLog.Select(RtxLog.TextLength, 0);
     // 滚动到富文本框光标处
     RtxLog.ScrollToCaret();
     // 追加内容
     RtxLog.AppendText(text as string);
     // 换行
     RtxLog.AppendText(Environment.NewLine);
 }
示例#2
0
 private void displayText(object o, EventArgs e)
 {
     RtxLog.AppendText(DateTime.Now + " - Dados Recebidos: " + rxString + Environment.NewLine);
     RtxLog.SelectionStart = RtxLog.TextLength;
     RtxLog.ScrollToCaret();
 }
示例#3
0
 private void btnLimpar_Click(object sender, EventArgs e)
 {
     RtxLog.Clear();
 }