private void LogInformation(string content, int dir = AToolConstants.LOG_NONE) { StringBuilder outputSb = new StringBuilder(); if (configInfo.RecvShowTime) { string dateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"); outputSb.Append("["); outputSb.Append(dateTime); outputSb.Append("]"); if (dir == AToolConstants.LOG_RECV) { outputSb.Append("收<-"); } else if (dir == AToolConstants.LOG_SEND) { outputSb.Append("发<-"); } else if (dir == AToolConstants.LOG_NONE) { } } outputSb.Append(content); DelegateControls.SetRichText(this, this.richTextBox1, Color.Black, outputSb.ToString(), true, false); if (dir != AToolConstants.LOG_NONE) { outputSb.Remove(0, 25); } LogHelper.Info(outputSb.ToString()); }
private void LogRecv(string content) { DelegateControls.SetRichText(this, this.richTextBox1, Color.Black, content, true, false); }
private void LogWarning(string content) { DelegateControls.SetRichText(this, this.richTextBox1, Color.Yellow, content, true, false); }