浏览代码

每天零点自动清除文本框内容

callm 5 年之前
父节点
当前提交
2ece34e12a
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      FileWatcher/Form1.cs
  2. 二进制
      FileWatcher/tool/Oracle.ManagedDataAccess.dll

+ 6 - 1
FileWatcher/Form1.cs

@@ -188,6 +188,11 @@ namespace FileWatcher
             {
 
             }
+            //每天0点清空文本框的内容
+            if (DateTime.Now.ToString("HH:mm") == "00:00")
+            {
+                richTextBox1.Clear();
+            }
         }
 
         private void RunTran()
@@ -265,7 +270,7 @@ namespace FileWatcher
                         try
                         {
                             if (!File.Exists(StartPath + Filename + ".xls") ||
-                                ((new FileInfo(shpFile.FullName).Length / 1024 > 50)&&(File.Exists(StartPath + Filename + ".xls") && (new FileInfo(StartPath + Filename + ".xls").Length / 1024) < 100)))
+                                ((new FileInfo(shpFile.FullName).Length / 1024 > 50) && (File.Exists(StartPath + Filename + ".xls") && (new FileInfo(StartPath + Filename + ".xls").Length / 1024) < 100)))
                             {
                                 Thread.Sleep(1500);
                                 exec(@"D:\FileWatcher\JDF\DTS-JDFData2Excel.exe", @"D:\FileWatcher\JDF\DTS-JDFData2Excel.exe " + shpFile.FullName);

二进制
FileWatcher/tool/Oracle.ManagedDataAccess.dll