From a45fe56aeeac8f28a9891b83362954067c8166dc Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期五, 14 八月 2020 09:07:05 +0800 Subject: [PATCH] 请合并新代码,更改多功能面板绑定表重复问题 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs index bb9ce8a..4532393 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs @@ -660,6 +660,11 @@ return false; } } + //鍒锋柊鍏ㄩ儴鍦烘櫙 + if (this.IsMainGateway(realWay) == 1) + { + HdlSceneLogic.Current.RefreshSceneUIList(false); + } //鑾峰彇鍏ㄩ儴璁惧 int result = LocalDevice.Current.SetDeviceToMemmoryByGateway(realWay, false); @@ -1520,7 +1525,7 @@ var tempWay = ZbGateway.GateWayList.Find(obj => (obj != null) && (obj.GwId == gateway.GwId)); if (tempWay == null) { - ZbGateway.GateWayList.Add(tempWay); + ZbGateway.GateWayList.Add(gateway); } } } @@ -1538,6 +1543,11 @@ /// <returns></returns> public List<FirmwareVersionInfo> GetGatewayAllNewVersion(ZbGateway zbGateway, ShowErrorMode mode = ShowErrorMode.YES) { + //濡傛灉鏄睍绀烘ā鏉�,鎴栬�呮槸铏氭嫙浣忓畢鐨勮瘽,娌℃湁浠�涔堟柊鐗堟湰鐨勮娉� + if (Common.Config.Instance.Home.IsVirtually == true || Common.Config.Instance.Home.IsShowTemplate == true) + { + return new List<FirmwareVersionInfo> { null, null, null }; + } //鑾峰彇缃戝叧鐗堟湰淇℃伅 var result = this.GetGatewayInfo(zbGateway, false, mode); if (result == null) @@ -1623,6 +1633,13 @@ /// <returns></returns> public List<ZbGatewayData.DriveCodeObj> GetListVDDriveCode(ZbGateway zbGateway) { + //濡傛灉鏄睍绀烘ā鏉�,鎴栬�呮槸铏氭嫙浣忓畢鐨勮瘽,鐩存帴鍙栫紦瀛� + if (Common.Config.Instance.Home.IsVirtually == true || Common.Config.Instance.Home.IsShowTemplate == true) + { + //鍙栨湰鍦板璞� + var localgw = this.GetLocalGateway(zbGateway.GwId); + return localgw != null ? zbGateway.DriveCodeList : zbGateway.DriveCodeList; + } var jObject = new Newtonsoft.Json.Linq.JObject { { "Cluster_ID", 0 }, { "Command", 505 } }; var result = this.SendJobjectDataToGateway(zbGateway, "VirtualDrive/CatDriveCode", jObject.ToString(), "VirtualDrive/CatDriveCode_Respon"); if (result.ErrorMsg != null) @@ -1891,6 +1908,11 @@ } return false; } + if (((decimal)Longitude) == 0 && ((decimal)Latitude) == 0) + { + //娌℃湁閰嶇疆杩囩粡绾害 + return true; + } int result = -1; Action<string, string> action = (topic, message) => -- Gitblit v1.8.0