From 1a4b95a7ebef71838bd3eda2c22056bbf0db65ec Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 10 一月 2020 16:39:54 +0800
Subject: [PATCH] 2019阶段备份
---
HDL_ON/DAL/FileUtils.cs | 31 +++++--------------------------
1 files changed, 5 insertions(+), 26 deletions(-)
diff --git a/HDL_ON/DAL/FileUtils.cs b/HDL_ON/DAL/FileUtils.cs
index 1954b2c..cbb23b7 100644
--- a/HDL_ON/DAL/FileUtils.cs
+++ b/HDL_ON/DAL/FileUtils.cs
@@ -7,6 +7,7 @@
using HDL_ON.UI;
using HDL_ON.DAL.Net;
using HDL_ON.DAL;
+using HDL_ON.Entity;
namespace HDL_ON.MyIO
{
@@ -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);
@@ -237,38 +238,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