From ec579e2c851960d59bda3f201a1eae3f6ca0935b Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周一, 24 6月 2024 10:21:50 +0800 Subject: [PATCH] 2 --- DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.cs | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.cs index f8ac998..1b28878 100644 --- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.cs +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.cs @@ -9,6 +9,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock; namespace iWare_SCADA_FormTest { @@ -43,5 +44,29 @@ } } + + private void button2_Click(object sender, EventArgs e) + { + try + { + string path = ConfigHelper.GetConfigString("OP60QualityData_Test"); + + var newFiles = FileHelper.DetectNewFiles(path, "*.dfq", 300, DateTime.Now.AddDays(-100), DateTime.Now.AddDays(1)); + + foreach (System.IO.FileInfo file in newFiles) + { + //MessageBox.Show("鎵惧埌鏂囦欢:" + file.FullName); + var toPath = file.FullName.Replace("Measuring_Data_df_Test", "Measuring_Data_df_Copy"); + //MessageBox.Show("瑕佺Щ鍔ㄥ埌:" + file.FullName); + File.Move(file.FullName, toPath);//绉诲姩 + } + + MessageBox.Show("鎴愬姛"); + } + catch (Exception ex) + { + MessageBox.Show("寮傚父:" + ex.Message); + } + } } } -- Gitblit v1.9.3