From eda3fb873e59544ff36301b51e05aef64f87b0f9 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期五, 27 八月 2021 13:21:21 +0800 Subject: [PATCH] Merge branch 'newBranch1' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into newBranch1 --- HDL_ON/DAL/Mqtt/MqttInfoConfig.cs | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/HDL_ON/DAL/Mqtt/MqttInfoConfig.cs b/HDL_ON/DAL/Mqtt/MqttInfoConfig.cs index c83e9f5..2bc9532 100644 --- a/HDL_ON/DAL/Mqtt/MqttInfoConfig.cs +++ b/HDL_ON/DAL/Mqtt/MqttInfoConfig.cs @@ -24,7 +24,7 @@ { try { - var MqttInfoConfigBytes = FileUtils.ReadFile(ConfigFile); + var MqttInfoConfigBytes = Common.FileUtlis.Files.ReadFile(ConfigFile); var MqttInfoConfigString = Encoding.UTF8.GetString(MqttInfoConfigBytes); MqttInfoConfig temp = null; if (MqttInfoConfigString != null) @@ -49,7 +49,7 @@ } } - public HomeGatewayInfo HomeGatewayInfo = null; + public HomeGatewayInfo HomeGatewayInfo = new HomeGatewayInfo(); public MqttInfo mMqttInfo = null; @@ -67,12 +67,13 @@ public void Refresh() { m_Current = null; - Save(); + Common.FileUtlis.Files.DeleteFile(ConfigFile); + //Save(); } public void Save() { - FileUtils.WriteFileByBytes(ConfigFile, GetMqttInfoConfigBytes()); + Common.FileUtlis.Files.WriteFileByBytes(ConfigFile, GetMqttInfoConfigBytes()); } } } \ No newline at end of file -- Gitblit v1.8.0