From e28d283bd27db2c40ff435c517db54e2010e8ae6 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期二, 24 十二月 2019 14:31:56 +0800
Subject: [PATCH] 2019.12.24

---
 ZigbeeApp/Shared/Phone/Device/Category/SelectScene.cs |   40 +++++++++++++++++++++++++++++++---------
 1 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectScene.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectScene.cs
index 7b3c175..c789c3e 100644
--- a/ZigbeeApp/Shared/Phone/Device/Category/SelectScene.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectScene.cs
@@ -23,7 +23,7 @@
         /// <summary>
         /// BeforesceneTargetDeviceUIs
         /// </summary>
-        public List<SceneTargetDeviceUI> beforeSceneTargetDeviceUIs=new List<SceneTargetDeviceUI> { };
+        public List<SceneTargetDeviceUI> beforeSceneTargetDeviceUIs = new List<SceneTargetDeviceUI> { };
         /// <summary>
         /// 妤煎眰
         /// </summary>
@@ -40,7 +40,10 @@
         /// sceneUI
         /// </summary>
         public SceneUI sceneUI;
-
+        /// <summary>
+        /// 褰撳墠鍦烘櫙鏈韩锛屾坊鍔犲満鏅椂浣跨敤
+        /// </summary>
+        public SceneUI currentSceneUI;
 
         #endregion
 
@@ -93,6 +96,8 @@
                 Gravity = Gravity.CenterVertical,
                 TextAlignment = TextAlignment.CenterRight,
                 TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+                TextSize = 14,
+                IsBold = true
             };
 
             selectFloorBtn = new Button()
@@ -148,7 +153,7 @@
             confirmBtn.SetTitle(R.MyInternationalizationString.Save);
             confirmBtn.MouseUpEventHandler += (sender, e) =>
             {
-                sceneTargetDevice.ElseScenesId = sceneUI.Id ;
+                sceneTargetDevice.ElseScenesId = sceneUI.Id;
                 sceneTargetDevice.SceneUI = sceneUI;
                 sceneTargetDevice.SceneName = sceneUI.Name;
                 selectedAction?.Invoke(sceneTargetDevice);
@@ -184,7 +189,7 @@
             functionSceneBodyView = new FrameLayout()
             {
                 Y = roomFL.Bottom,
-                Height = Application.GetRealHeight(910+622),
+                Height = Application.GetRealHeight(1080 + 452),
                 BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
             };
             bodyFrameLayout.AddChidren(functionSceneBodyView);
@@ -257,9 +262,11 @@
                 {
                     //Y = Application.GetRealHeight(58)
                 };
+
                 functionSceneBodyView.AddChidren(sceneScrolView);
                 SelectSceneRow tempSceneRow = new SelectSceneRow();
-                EventHandler<MouseEventArgs> selectScene = (sender, e) => {
+                EventHandler<MouseEventArgs> selectScene = (sender, e) =>
+                {
                     tempSceneRow.IsSelected = false;
                     tempSceneRow = ((sender as Button).Parent as SelectSceneRow);
                     ((sender as Button).Parent as SelectSceneRow).IsSelected = true;
@@ -270,6 +277,10 @@
                 for (int i = 0; i < sceneList.Count; i++)
                 {
                     var scene = sceneList[i];
+                    if (currentSceneUI?.Id == scene.Id)
+                    {
+                        continue;
+                    }
                     if (beforeSceneTargetDeviceUIs.Find((obj) => obj.SceneUI.Id == scene.Id) != null)
                     {
                         continue;
@@ -286,7 +297,7 @@
                     sceneRowLayout.Init();
                     sceneRowLayout.SetTitle(scene.Name);
                     sceneRowLayout.ClickButton.Tag = scene;
-                    if(sceneUI==null)
+                    if (sceneUI == null)
                     {
                         if (i == 0)
                         {
@@ -297,18 +308,29 @@
                     }
                     else
                     {
-                        if(sceneUI.Id==scene.Id)
+                        if (sceneUI.Id == scene.Id)
                         {
                             tempSceneRow = sceneRowLayout;
                             sceneUI = scene;
                             sceneRowLayout.IsSelected = true;
                         }
                     }
-                    
+
                     sceneRowLayout.ClickButton.MouseUpEventHandler += selectScene;
                 }
+
+                if (sceneList.Count > 8)
+                {
+                    var frame = new FrameLayout
+                    {
+                        Height = Application.GetRealHeight(300)
+                    };
+                    sceneScrolView.AddChidren(frame);
+                }
+
             }
         }
+    
 
         /// <summary>
         /// 鏄剧ず娌℃湁鍦烘櫙
@@ -331,7 +353,7 @@
                 Height = Application.GetRealHeight(200),
                 Width = Application.GetRealWidth(700),
                 Gravity = Gravity.CenterHorizontal,
-                Text = Language.StringByID(R.MyInternationalizationString.NoScene).Replace("{\\r\\n}", "\r\n"),
+                Text = Language.StringByID(R.MyInternationalizationString.NoScene_Tip).Replace("{\\r\\n}", "\r\n"),
                 TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
                 TextAlignment = TextAlignment.Center,
                 IsMoreLines = true

--
Gitblit v1.8.0