From 9ef48d7b2da7c408b53f73be0f6eef3cbac1c84a Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 19 十一月 2020 10:23:45 +0800 Subject: [PATCH] Evoyo.Home1.1.0120111601_Release --- ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs | 82 ++++++++++++++++++++-------------------- 1 files changed, 41 insertions(+), 41 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs index 1661741..51e3ab6 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs @@ -35,7 +35,7 @@ //鍒濆鍖栦腑閮ㄦ帶浠� this.InitMiddleFrame(); - + this.zbGateway = HdlGatewayLogic.Current.GetLocalGateway(GatewayResourse.AppOldSelectGatewayId); } @@ -211,23 +211,23 @@ rowThrid.ButtonClickEvent += (sender, e) => { rowThrid.CanClick = false; - HdlThreadLogic.Current.RunThread(() => + HdlThreadLogic.Current.RunThread(() => { //妫�娴嬬綉鍏� var errorMsg = this.CheckGateway(); - HdlThreadLogic.Current.RunMain(() => + HdlThreadLogic.Current.RunMain(() => { - rowThrid.CanClick = true; - if (errorMsg != null) - { - this.ShowMassage(ShowMsgType.Tip, errorMsg); - } - else - { - var form = new Device.DeviceSearchForm(); - form.AddForm(string.Empty); - } - }); + rowThrid.CanClick = true; + if (errorMsg != null) + { + this.ShowMassage(ShowMsgType.Tip, errorMsg); + } + else + { + var form = new Device.DeviceSearchForm(); + form.AddForm(string.Empty); + } + }); }); }; @@ -244,8 +244,8 @@ /// </summary> private string CheckGateway() { - if (zbGateway != null && zbGateway.LinuxImageType == 11) - { + if (zbGateway != null && zbGateway.LinuxImageType == 11) + { //mini澶滅伅鍙兘闄愬埗鍔犲叆16鍜岃澶� this.ShowProgressBar(); @@ -254,7 +254,7 @@ var listDevice = Common.LocalDevice.Current.GetDeviceListFromGateway(zbGateway.GwId, ref statu, true, ShowErrorMode.NO); if (statu != 1) { - //濡傛灉 + //濡傛灉 listDevice = Common.LocalDevice.Current.GetDeviceByGatewayID(zbGateway.GwId); } //妫�娴媘ini缃戝叧鐨勮澶囨暟 @@ -266,17 +266,17 @@ listMac.Add(device.DeviceAddr); } } - this.CloseProgressBar(); - + this.CloseProgressBar(); + bool canAdd = listMac.Count < 16; - if (canAdd == false) - { - //Mini缃戝叧鏈�澶у彧鑳芥坊鍔�16涓澶� - return Language.StringByID(R.MyInternationalizationString.uMiniGatewayMaxDeviceCountMsg); - } - } - - return null; + if (canAdd == false) + { + //Mini缃戝叧鏈�澶у彧鑳芥坊鍔�16涓澶� + return Language.StringByID(R.MyInternationalizationString.uMiniGatewayMaxDeviceCountMsg); + } + } + + return null; } #endregion @@ -309,25 +309,25 @@ if (formName != string.Empty) { rowLayout.ButtonClickEvent += (sender, e) => - { + { rowLayout.CanClick = false; - HdlThreadLogic.Current.RunThread(() => + HdlThreadLogic.Current.RunThread(() => { //妫�娴嬬綉鍏� var errorMsg = this.CheckGateway(); - HdlThreadLogic.Current.RunMain(() => + HdlThreadLogic.Current.RunMain(() => { - rowLayout.CanClick = true; - if (errorMsg != null) - { - this.ShowMassage(ShowMsgType.Tip, errorMsg); - } - else - { - //鍙嶅皠鐩爣鐣岄潰 - this.LoadFormByFullName("Shared.Phone.UserCenter.DeviceDirection." + formName); - } - }); + rowLayout.CanClick = true; + if (errorMsg != null) + { + this.ShowMassage(ShowMsgType.Tip, errorMsg); + } + else + { + //鍙嶅皠鐩爣鐣岄潰 + this.LoadFormByFullName("Shared.Phone.UserCenter.DeviceDirection." + formName); + } + }); }); }; } -- Gitblit v1.8.0