From 1b565ce5fc003551b2db3a624f81221ac1df46b9 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 18 十一月 2019 13:04:39 +0800 Subject: [PATCH] 同步 了全部的代码 --- ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs index e714665..aa69336 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs @@ -45,6 +45,10 @@ /// </summary> private string gatewayId = string.Empty; /// <summary> + /// 鐪熷疄缃戝叧 + /// </summary> + private ZbGateway realGateway = null; + /// <summary> /// 杩涘害鏉� /// </summary> private FrameLayout btnProgressBar = null; @@ -73,6 +77,7 @@ base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddDevice)); this.gatewayId = HdlGatewayLogic.Current.GetGatewayId(GatewayResourse.NowSelectGateway); + HdlGatewayLogic.Current.GetRealGateway(ref this.realGateway, this.gatewayId); //鍒濆鍖栦腑閮ㄦ帶浠� this.InitMiddleFrame(); @@ -144,13 +149,13 @@ return; } //璁╃綉鍏冲厑璁稿叆缃� - GatewayResourse.NowSelectGateway.AddNewDeviceToGateway(255); + this.realGateway.AddNewDeviceToGateway(255); System.Threading.Thread.Sleep(1000); } }); //娣诲姞鐩戣璁惧鏂颁笂鎶ョ殑浜嬩欢 - GatewayResourse.NowSelectGateway.GwResDataAction += this.AdjustGatewayResultData; + this.realGateway.GwResDataAction += this.AdjustGatewayResultData; } #endregion @@ -169,7 +174,7 @@ if (result == -1) { //鍋滄鎺ユ敹 - GatewayResourse.NowSelectGateway.GwResDataAction -= this.AdjustGatewayResultData; + this.realGateway.GwResDataAction -= this.AdjustGatewayResultData; Application.RunOnMainThread(() => { @@ -206,7 +211,7 @@ //缁欐柊璁惧璁剧疆涓婚敭灞炴�� Common.LocalDevice.Current.SetNewDeviceMainKeys(device, jobject); - device.CurrentGateWayId = HdlGatewayLogic.Current.GetGatewayId(GatewayResourse.NowSelectGateway); + device.CurrentGateWayId = HdlGatewayLogic.Current.GetGatewayId(this.realGateway); //灏咲eviceInfo鐨勫睘鎬ц缃埌涓诲睘鎬т腑 Common.LocalDevice.Current.SetDeviceInfoToMain(device, device); @@ -261,7 +266,7 @@ this.waitDeviceTimeOut--; } //鍋滄鎺ユ敹 - GatewayResourse.NowSelectGateway.GwResDataAction -= this.AdjustGatewayResultData; + this.realGateway.GwResDataAction -= this.AdjustGatewayResultData; System.Threading.Thread.Sleep(500); //鐩墠灏卞紕涓�涓� @@ -516,13 +521,13 @@ { base.CloseForm(); //鍋滄鎺ユ敹 - GatewayResourse.NowSelectGateway.GwResDataAction -= this.AdjustGatewayResultData; + this.realGateway.GwResDataAction -= this.AdjustGatewayResultData; HdlThreadLogic.Current.RunThread(() => { System.Threading.Thread.Sleep(1200); //鍏抽棴鍏ョ綉妯″紡 - GatewayResourse.NowSelectGateway.AddNewDeviceToGateway(0); + this.realGateway.AddNewDeviceToGateway(0); }); } -- Gitblit v1.8.0