Browse Source

添加本地记录日志

callm 1 day ago
parent
commit
b86baf3804
2 changed files with 6 additions and 2 deletions
  1. 0 2
      FileWatcher/AutoAnalysisXml.cs
  2. 6 0
      FileWatcher/RichTextAutoBottom.cs

+ 0 - 2
FileWatcher/AutoAnalysisXml.cs

@@ -7,8 +7,6 @@ using System.Threading;
 using System.Windows.Forms;
 using System.Xml;
 using System.Text;
-using System.Media;
-using NPOI.SS.Formula.Functions;
 
 namespace FileWatcher
 {

+ 6 - 0
FileWatcher/RichTextAutoBottom.cs

@@ -23,6 +23,12 @@ namespace FileWatcher
             SelectionStart = Text.Length;
             ScrollToCaret();
         }
+        public void AppendText(string str)
+        {
+            base.AppendText(str);
+            //如果颜色是红色则进行提示音
+            LogManager.DoLog(FindForm().Tag + str);
+        }
 
         /// <summary>
         /// color设置AppendText的颜色