From 4b378188ce972df432b23d9cb73babb6cc0679c6 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 17 一月 2020 14:56:15 +0800
Subject: [PATCH] 合并代码 ver.10086

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
index 0554fa7..c691a17 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
@@ -35,6 +35,11 @@
         public void ShowForm(string deviceMac)
         {
             this.listNewDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceMac);
+            if (listNewDevice.Count == 0)
+            {
+                //瀵瑰簲鍗曠函鍙湁200鍥炶矾鐨勮澶�
+                listNewDevice.Add(Common.LocalDevice.Current.GetOTADevice(deviceMac));
+            }
 
             //璁剧疆鏍囬淇℃伅
             base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddDevice));
@@ -128,6 +133,10 @@
             {
                 foreach (var device in this.listNewDevice)
                 {
+                    if (device is OTADevice)
+                    {
+                        continue;
+                    }
                     var room = Common.Room.CurrentRoom.GetRoomByDevice(device);
                     string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
                     if (room == null)
@@ -235,7 +244,7 @@
             this.saveDefultName = string.Empty;
 
             //濡傛灉瀹冪殑鍥炶矾鍙湁涓�涓殑璇濓紝鍒欏湪璁惧涓婃姤鐨勬椂鍊欙紝淇敼MAC鍚嶅瓧涔嬪悗锛岃繛鍚岀鐐瑰悕瀛椾篃涓�璧蜂慨鏀�
-            if (this.listNewDevice.Count == 1)
+            if (this.listNewDevice.Count == 1 && (this.listNewDevice[0] is OTADevice) == false)
             {
                 //淇敼绔偣鍚嶅瓧
                 result = await Common.LocalDevice.Current.ReName(this.listNewDevice[0], deviceName, mode);
@@ -253,7 +262,7 @@
         {
             foreach (var device in this.listNewDevice)
             {
-                if (Common.LocalDevice.Current.GetSimpleEpointName(device) != string.Empty)
+                if ((device is OTADevice) || Common.LocalDevice.Current.GetSimpleEpointName(device) != string.Empty)
                 {
                     //鏈夊悕瀛椾笉澶勭悊
                     continue;

--
Gitblit v1.8.0