JLChen
2021-02-05 427a6e93b8946b9d91727166a352b2ee2ef75d19
HDL_ON/Entity/DB_ResidenceData.cs
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
@@ -107,7 +107,7 @@
                    }
                    instance.residenceImage = "Classification/Room/Roombg.png";
                    //初始化住宅功能数据
                    SpatialInfo.CurrentSpatial.InitRoomFunction();
                    SpatialInfo.CurrentSpatial.InitRoomListFunctions();
                }
                return instance;
@@ -121,13 +121,16 @@
            instance = null;
            ins_OidList = null;
            HomeGateway = null;
            //重置网关状态
            DriverLayer.Control.Ins.GatewayOnline = false;
            SpatialInfo.CurrentSpatial.Clear();
            FunctionList.List.Clear();
            
            ///切换住宅清空前住宅缓存自动化列表;
            HDL_ON.UI.UI2.Intelligence.Automation.Logic.LogicList.Clear();
            if (MainPage.IsRemote)
            if (HDL_ON.DriverLayer.Control.Ins.IsRemote)
            {
                DriverLayer.Control.Ins.IsRemote = false;
                DAL.Mqtt.MqttClient.DisConnectRemote("退出登录,或者切换住宅");
            }
        }
@@ -271,7 +274,6 @@
        /// <returns></returns>
        static byte[] ReadResidenceInfo()
        {
                MainPage.Log("get file Instance ");
            var fileName = "DB_ResidenceData";
            FileStream fs = null;
            try
@@ -299,7 +301,6 @@
            }
            finally
            {
                MainPage.Log("get file  ");
                try
                {
                    if (fs != null)
@@ -421,4 +422,4 @@
        #endregion
    }
}
}