gxc
2020-02-28 66a9965c44ecc32a6696abca876ab9d1cd091584
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
@@ -142,8 +142,10 @@
                List<CommonDevice> list = Common.LocalDevice.Current.GetDeviceByGatewayID(gatewayId);
                foreach (var device in list)
                {
                    //删除设备,不删除房间信息
                    Common.LocalDevice.Current.DeleteMemmoryDevice(device, false);
                    //删除一般设备
                    Common.LocalDevice.Current.DeleteMemmoryDevice(device, true);
                    //删除Ota设备
                    Common.LocalDevice.Current.DeleteMemmoryOtaDevice(device.DeviceAddr);
                }
                //删除网关文件
                this.DeleteGatewayFile(gatewayId);
@@ -425,6 +427,7 @@
        /// 重新绑定网关(1:正常  -1:异常  0:当前的网关绑定在了当前账号下的不同住宅里面)
        /// </summary>
        /// <param name="zbGateway">网关</param>
        /// <param name="btnMsg">消息控件</param>
        public async Task<int> ReBindNewGateway(ZbGateway zbGateway, NormalViewControl btnMsg = null)
        {
            if (zbGateway == null)
@@ -657,10 +660,10 @@
            }
            //获取全部设备
            bool result = LocalDevice.Current.SetDeviceToMemmoryByGateway(realWay);
            int result = LocalDevice.Current.SetDeviceToMemmoryByGateway(realWay);
            //关闭进度条
            ProgressBar.Close();
            if (result == false)
            if (result == -1)
            {
                return false;
            }
@@ -758,6 +761,8 @@
            {
                //删除设备文件
                Common.LocalDevice.Current.DeleteMemmoryDevice(device, true);
                //删除Ota设备
                Common.LocalDevice.Current.DeleteMemmoryOtaDevice(device.DeviceAddr);
            }
            //如果是主网关
            if (this.IsMainGateway(zbGatewayID) == 1)