Explorar el Código

完善提示信息时间

yhluo hace 18 horas
padre
commit
3fbb93ec2b
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      UAS_MES_WEIP/CustomControl/RichText/RichTextAutoBottom.cs

+ 2 - 1
UAS_MES_WEIP/CustomControl/RichText/RichTextAutoBottom.cs

@@ -32,7 +32,8 @@ namespace UAS_MES_NEW.CustomControl.RichText
         public void AppendText(string str, Color color)
         {
             SelectionColor = color;
-            base.AppendText(str);
+            string timePrefix = $"[{DateTime.Now:yyyy-MM-dd HH:mm:ss} ] ";
+            base.AppendText(timePrefix + str);
             //如果颜色是红色则进行提示音
             if (color == Color.Red && Entity.SystemInf.CheckAudioEnable)
             {