KWD před 2 měsíci
rodič
revize
680f5c979b
2 změnil soubory, kde provedl 493 přidání a 480 odebrání
  1. 27 20
      TeamAAS-VM/Core/Management.cs
  2. 466 460
      TeamAAS-VM/Views/Product/PlcPointParams.xaml

+ 27 - 20
TeamAAS-VM/Core/Management.cs

@@ -5845,27 +5845,24 @@ namespace TeamAAS_VP.Core
         public class SharedSpeedFileHelper
         {
             private static readonly object _lockObj = new object();
-            private readonly string _filePath;
-
-
-            public SharedSpeedFileHelper()
-            {
-                try
-                {
-                    string directoryPath = @"Z:\\1111\\2222\\3333";
+            string directoryPath = @"Z:\\XTM\\Speed";
+            //public SharedSpeedFileHelper()
+            //{
+            //    try
+            //    {
+            //        string directoryPath = @"Z:\\1111\\2222\\3333";
 
-                    // 确保目录存在
-                    if (!Directory.Exists(directoryPath))
-                        Directory.CreateDirectory(directoryPath);
+            //        // 确保目录存在
+            //        if (!Directory.Exists(directoryPath))
+            //            Directory.CreateDirectory(directoryPath);
 
-                    _filePath = Path.Combine(directoryPath, "SharedSpeedData.json");
-                }
-                catch
-                {
-                    LogHelper.WriteLogInfo("Z盘路径不存在");
-                }
-                
-            }
+            //        _filePath = Path.Combine(directoryPath, "SharedSpeedData.json");
+            //    }
+            //    catch
+            //    {
+            //        LogHelper.WriteLogInfo("Z盘路径不存在");
+            //    }
+            //}
 
             // 写入速度数据
             public void WriteSpeedData(string speed, int state)
@@ -5885,6 +5882,12 @@ namespace TeamAAS_VP.Core
                         {
                             WriteIndented = true
                         });
+                      
+                        // 确保目录存在
+                        if (!Directory.Exists(directoryPath))
+                            Directory.CreateDirectory(directoryPath);
+
+                       string _filePath = Path.Combine(directoryPath, "SharedSpeedData.json");
 
                         File.WriteAllText(_filePath, json, Encoding.UTF8);
                     }
@@ -5902,8 +5905,12 @@ namespace TeamAAS_VP.Core
                 {
                     try
                     {
-                        if (!File.Exists(_filePath))
+                        // 确保目录存在
+                        if (!Directory.Exists(directoryPath))
+                        {
                             return null;
+                        }
+                        string _filePath = Path.Combine(directoryPath, "SharedSpeedData.json");
 
                         string json = File.ReadAllText(_filePath, Encoding.UTF8);
                         return JsonSerializer.Deserialize<SpeedData>(json);

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 466 - 460
TeamAAS-VM/Views/Product/PlcPointParams.xaml


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů