From ecba45c93391066bc30c7bd602c3a7683fbb99a7 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 31 七月 2020 10:56:12 +0800
Subject: [PATCH] 临时备份

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs |   24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
index d272cde..d3c8be3 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
@@ -354,10 +354,12 @@
                     continue;
                 }
                 roomTempList.Add(room);
-                if (roomTempList.Count != 0)
-                {
-                    curRoom = roomTempList[0];
-                }
+            }
+
+            for (int i = 0; i < roomTempList.Count; i++)
+            {
+                var room = roomTempList[i];
+                curRoom = roomTempList[0];
 
                 var btnRoomFrameLayout = new FrameLayout
                 {
@@ -373,7 +375,7 @@
                 var btnRoom = new Button
                 {
                     Height = Application.GetRealHeight(58),
-                    Width = Application.GetRealWidth(127),
+                    Width = Application.GetRealWidth(255),
                     Y = Application.GetRealHeight(58),
                     X = Application.GetRealWidth(14),
                     Text = room.Name,
@@ -391,6 +393,18 @@
                     curentOldRoom = btnRoom;
                     curentOldRoomFrameLayout = btnRoomFrameLayout;
                 }
+                if (index == roomTempList.Count - 1 && index > 3)
+                {
+                    var btnRoomFrameLayoutEmpty = new FrameLayout
+                    {
+                        Height = Application.GetMinReal(159),
+                        Width = Application.GetMinReal(50),
+                        Y = Application.GetRealHeight(23),
+                        X = Application.GetRealWidth(5),
+                        BorderWidth = 1,
+                    };
+                    btnHorizontalScrolViewLayout.AddChidren(btnRoomFrameLayoutEmpty);
+                }
                 EventHandler<MouseEventArgs> eHandlerRoom = (sender, e) =>
                 {
                     if (!btnRoom.IsSelected)

--
Gitblit v1.8.0