From c1de48884fa145a16a0f8bcee93274dcfaa0ff82 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期四, 07 五月 2020 10:40:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into dev-2020xm

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs |   38 ++++++++++++++++++++++++++++----------
 1 files changed, 28 insertions(+), 10 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
old mode 100755
new mode 100644
index b0f791b..5180833
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
@@ -88,11 +88,8 @@
                 {
                     localDeviceList.Clear();
                     scList.Clear();
-                    //鑾峰彇鏈湴璁惧鍒楄〃
-                    foreach (var dev in Shared.Common.LocalDevice.Current.listAllDevice)
-                    {
-                        localDeviceList.Add(dev);
-                    }
+                    //鑾峰彇鏈湴璁惧鍒楄〃 
+                    localDeviceList = Shared.Common.LocalDevice.Current.listAllDevice;
                     //鑾峰彇鏈湴鍦烘櫙鍒楄〃
                     scList = HdlSceneLogic.Current.GetAllRoomSceneList();
                     //鑾峰彇缃戝叧鍦烘櫙琛�
@@ -246,7 +243,7 @@
 
             var btnAddFrameLayout = new FrameLayout()
             {
-                X = Application.GetRealWidth(888),
+                X = Application.GetRealWidth(772 - 58),
                 Width = Application.GetRealWidth(192),
             };
             this.titleFrameLayout.AddChidren(btnAddFrameLayout);
@@ -352,6 +349,7 @@
             InitListInfo();
 
         }
+
         /// <summary>
         /// 涓儴甯冨眬
         /// </summary>
@@ -490,6 +488,10 @@
                             {
                                 btnFloorRoomNameText = myName;
                             }
+                            else
+                            {
+                                btnFloorRoomNameText = Language.StringByID(R.MyInternationalizationString.Undistributed);
+                            }
                         }
                     }
                     else
@@ -512,11 +514,25 @@
                                     var tempDevFloorName = Common.Config.Instance.Home.GetFloorNameById(tempDevFloorId);
                                     if (string.IsNullOrEmpty(tempDevFloorName))
                                     {
-                                        btnFloorRoomNameText = tempDevRoomName;
+                                        if (string.IsNullOrEmpty(tempDevRoomName))
+                                        {
+                                            btnFloorRoomNameText = Language.StringByID(R.MyInternationalizationString.Undistributed);
+                                        }
+                                        else
+                                        {
+                                            btnFloorRoomNameText = tempDevRoomName;
+                                        }
                                     }
                                     else
                                     {
-                                        btnFloorRoomNameText = tempDevFloorName + "," + tempDevRoomName;
+                                        if (string.IsNullOrEmpty(tempDevRoomName))
+                                        {
+                                            btnFloorRoomNameText = Language.StringByID(R.MyInternationalizationString.Undistributed);
+                                        }
+                                        else
+                                        {
+                                            btnFloorRoomNameText = tempDevFloorName + "," + tempDevRoomName;
+                                        }
                                     }
                                 }
 
@@ -640,10 +656,10 @@
                              else
                              {
                                  var temp = await currentKey.ConfigureHdlKeyValueAsync(Panel.KeyMode.Default);
-                                 if (temp.setWritableValueResponData?.Status != 0)
+                                 if (temp != null && temp.setWritableValueResponData?.Status != 0)
                                  {
                                      var temp1 = await currentKey.ConfigureHdlKeyValueAsync(Panel.KeyMode.Default);
-                                     if (temp1.setWritableValueResponData?.Status != 0)
+                                     if (temp1 != null && temp1.setWritableValueResponData?.Status != 0)
                                      {
                                          new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.ChangeBindMode), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(btnDel);
                                      }
@@ -739,8 +755,10 @@
                 }
             }
 
+            int count = 0;
             foreach (var value in typeModeList)
             {
+                count++;
                 #region  rowView
                 var rowView = new FrameLayout()
                 {

--
Gitblit v1.8.0