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 +++++++++++++++++++++++++
 DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.Designer.cs |   17 +++++++++++++++--
 DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/App.config        |    1 +
 3 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/App.config b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/App.config
index c50a458..782af6f 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/App.config
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/App.config
@@ -5,5 +5,6 @@
     </startup>
   <appSettings>
     <add key="OP80QualityData_Test" value="X:\CA4GC20TD_Test\"/>
+    <add key="OP60QualityData_Test" value="Q:\Measuring_Data_df_Test\"/>
   </appSettings>
 </configuration>
diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.Designer.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.Designer.cs
index 80464e5..141a16a 100644
--- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.Designer.cs
+++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_FormTest/Form1.Designer.cs
@@ -29,23 +29,35 @@
         private void InitializeComponent()
         {
             this.button1 = new System.Windows.Forms.Button();
+            this.button2 = new System.Windows.Forms.Button();
             this.SuspendLayout();
             // 
             // button1
             // 
             this.button1.Location = new System.Drawing.Point(76, 55);
             this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(135, 54);
+            this.button1.Size = new System.Drawing.Size(244, 54);
             this.button1.TabIndex = 0;
-            this.button1.Text = "娴嬭瘯绉诲姩鏂囦欢";
+            this.button1.Text = "OP80娴嬭瘯绉诲姩鏂囦欢";
             this.button1.UseVisualStyleBackColor = true;
             this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // button2
+            // 
+            this.button2.Location = new System.Drawing.Point(76, 142);
+            this.button2.Name = "button2";
+            this.button2.Size = new System.Drawing.Size(244, 54);
+            this.button2.TabIndex = 1;
+            this.button2.Text = "OP60娴嬭瘯绉诲姩鏂囦欢";
+            this.button2.UseVisualStyleBackColor = true;
+            this.button2.Click += new System.EventHandler(this.button2_Click);
             // 
             // Form1
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(800, 450);
+            this.Controls.Add(this.button2);
             this.Controls.Add(this.button1);
             this.Name = "Form1";
             this.Text = "Form1";
@@ -56,6 +68,7 @@
         #endregion
 
         private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.Button button2;
     }
 }
 
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