From 7167334c0e89dd84827d59e726123d14776e3a09 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 16 六月 2020 11:14:13 +0800
Subject: [PATCH] 2020-06-16-1

---
 HDL_ON/DAL/FileUtils.cs |   39 ++++++++-------------------------------
 1 files changed, 8 insertions(+), 31 deletions(-)

diff --git a/HDL_ON/DAL/FileUtils.cs b/HDL_ON/DAL/FileUtils.cs
index 1954b2c..cf0db1b 100644
--- a/HDL_ON/DAL/FileUtils.cs
+++ b/HDL_ON/DAL/FileUtils.cs
@@ -4,11 +4,12 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using Shared;
-using HDL_ON.UI;
+//using HDL_ON.UI;
 using HDL_ON.DAL.Net;
 using HDL_ON.DAL;
+using HDL_ON.Entity;
 
-namespace HDL_ON.MyIO
+namespace HDL_ON
 {
     public static class FileUtils
     {
@@ -78,7 +79,7 @@
                 {
                     continue;
                 }
-                System.IO.FileInfo fileInfo = new System.IO.FileInfo(regionRootPath + NextFile.Name);
+                FileInfo fileInfo = new FileInfo(regionRootPath + NextFile.Name);
                 if (fileInfo.Exists)
                 {
                     fileInfo.MoveTo(Application.RootPath + NextFile.Name);
@@ -86,9 +87,7 @@
                 }
             }
         }
-
-
-
+        
         /// <summary>
         /// 閬嶅巻鏂囦欢
         /// </summary>
@@ -237,38 +236,16 @@
         /// 鎵�浠ommon.GetType()鑾峰彇涓嶅埌鐪熷疄鐨勮澶囩被鍨�
         /// 鎵�浠ヨ繖閲岃鎵嬪姩浼犲叆璁惧鐨勭被鍨�
         /// </param>
-        public static string ReadEquipmentMessage(Common common)
+        public static void ReadFunctionMessage(Function common)
         {
-            string fileName = "Equipment_";
-            if (common.Type.ToString() == "WirelessPanel")
-            {
-                fileName += DeviceType.ButtonPanel.ToString() + "_" + common.SubnetID.ToString() + "_" + common.DeviceID.ToString();
-            }
-            else
-            {
-                fileName += common.Type + "_" + common.SubnetID.ToString() + "_" + common.DeviceID.ToString();
-            }
-            byte[] bytes1 = ReadFile(fileName);
-            string one = System.Text.Encoding.UTF8.GetString(bytes1);
-            return one;
         }
 
         /// <summary>
         /// Saves the equipment message.
         /// </summary>
-        public static void SaveEquipmentMessage(Common common, string loopID = "")
+        public static void SaveFunctionMessage(Function common )
         {
-            string deviceType = common.Type.ToString();
-            if (common.Type == DeviceType.LightSwitchSocket)
-                deviceType = DeviceType.LightSwitch.ToString();
-            string fileName = "Equipment_" + deviceType + "_" + common.SubnetID + "_" + common.DeviceID;
-            if (loopID != "")
-            {
-                fileName += "_" + (loopID.Length < 2 ? "0" + loopID : loopID);
-            }
-            common.SavePath = fileName;
-            MainPage.Log(fileName);
-            WriteFileByBytes(fileName, CommonPage.MyEncodingUTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(common)));
+           
         }
 
         /// <summary>

--
Gitblit v1.8.0