From eb9cf55fc8568cb2d4b4bfac9deb617ce766a7a5 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 20 十二月 2019 14:58:37 +0800
Subject: [PATCH] 2019.12.30

---
 ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs |   37 +++++++++++++++++++++++++------------
 1 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
index e1661ef..4e3beee 100644
--- a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
@@ -236,6 +236,7 @@
                             UserView.HomePage.Instance.PageIndex += 1;
                             sceneView.sceneTargetDevice = targetDevice;
                             sceneView.sceneUI = targetDevice.SceneUI;
+                            sceneView.currentSceneUI = modifySceneUI;
                             sceneView.Show();
                             sceneView.selectedAction = (selectedScene) =>
                             {
@@ -250,8 +251,17 @@
                             };
                         }
                     }
+                }
 
-
+                if (sceneTargetDevicesList.Count > 2)
+                {
+                    var targetRowLayout = new RowLayout()
+                    {
+                        Height = Application.GetRealHeight(300),
+                        LineColor = ZigbeeColor.Current.GXCBackgroundColor,
+                        BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+                    };
+                    TargetListScrolView.AddChidren(targetRowLayout);
                 }
             }
         }
@@ -631,7 +641,7 @@
                     {
                         curRoom = rooms[index1][index2];
                         zoneRow.SetTitle($"{Config.Instance.Home.GetFloorNameById(floorIds[index1])} , {rooms[index1][index2].Name}");
-                    }, 0, 0, Language.StringByID(R.MyInternationalizationString.BelongFloor),
+                    }, 0, 0, Language.StringByID(R.MyInternationalizationString.BelongZone),
                    Language.StringByID(R.MyInternationalizationString.Confrim),
                    Language.StringByID(R.MyInternationalizationString.Cancel));
                 }
@@ -651,7 +661,7 @@
                     {
                         curRoom = rs[index1];
                         zoneRow.SetTitle(rs[index1].Name);
-                    }, 0, Language.StringByID(R.MyInternationalizationString.BelongFloor),
+                    }, 0, Language.StringByID(R.MyInternationalizationString.BelongZone),
                    Language.StringByID(R.MyInternationalizationString.Confrim),
                    Language.StringByID(R.MyInternationalizationString.Cancel));
                 }
@@ -662,15 +672,18 @@
             EventHandler<MouseEventArgs> targetAddHander = (sender, e) =>
             {
 
-                if (curRoom == null)
+                //if (curRoom == null)
+                //{
+                //    RoomCommon.ShowTipNoRoom();
+                //    return;
+                //}
+                if(curRoom != null)
                 {
-                    RoomCommon.ShowTipNoRoom();
-                    return;
-                }
-                if (curRoom.IsSharedRoom)
-                {
-                    RoomCommon.ShowTipRoomIsShared();
-                    return;
+                    if (curRoom.IsSharedRoom)
+                    {
+                        RoomCommon.ShowTipRoomIsShared();
+                        return;
+                    }
                 }
 
                 int selectRow_Height = 150;
@@ -770,6 +783,7 @@
                     UserView.HomePage.Instance.AddChidren(sceneView);
                     UserView.HomePage.Instance.PageIndex += 1;
                     sceneView.beforeSceneTargetDeviceUIs = sceneTargetDevicesList;
+                    sceneView.currentSceneUI = modifySceneUI;
                     sceneView.Show();
                     sceneView.selectedAction = (selectedScene) =>
                     {
@@ -1107,7 +1121,6 @@
 
                     }
                 }
-
 
             };
             #endregion

--
Gitblit v1.8.0