From 16604a593202f2f87adf71abd57d036fe7da3b52 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 18 十一月 2019 10:39:42 +0800
Subject: [PATCH] 同步了全部的代码

---
 ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs |   33 +++++++++++++++++++++++++++++----
 1 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs
index 60c4509..2d83bdd 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs
@@ -19,6 +19,7 @@
         Button roomTextButton = new Button();
         Button devicetypeButton = new Button();
         VerticalScrolViewLayout middle;
+        HorizontalScrolViewLayout devicetypehorizontalScrol1;
         FrameLayout clickframeLayout = new FrameLayout();
         Button clickbutton = new Button();
         Button clicktextcolcrbutton = new Button();
@@ -119,7 +120,7 @@
             };
             this.AddChidren(roomhorizontalScrol);
 
-            var devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
+             devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
             {
                 Width = Application.GetRealWidth(1080 - 58 - 200),
                 Height = Application.GetRealHeight(280),
@@ -342,6 +343,18 @@
                         }
                         list.Add(device);
                     }
+                    if (list.Count == 0)
+                    {
+                        devicetypehorizontalScrol.Height = 0;
+                        devicetypehorizontalScrol1.Height = 0;
+                        middle.Height = 0;
+                    }
+                    else
+                    {
+                        devicetypehorizontalScrol.Height = Application.GetRealHeight(280);
+                        devicetypehorizontalScrol1.Height = Application.GetRealHeight(280);
+                        middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
+                    }
                     AllDeviceTypeView(list, devicetypehorizontalScrol);
 
                 }
@@ -371,6 +384,18 @@
                             continue;
                         }
                         list.Add(device);
+                    }
+                    if (list.Count == 0)
+                    {
+                        devicetypehorizontalScrol.Height = 0;
+                        devicetypehorizontalScrol1.Height = 0;
+                        middle.Height = 0;
+                    }
+                    else
+                    {
+                        devicetypehorizontalScrol.Height = Application.GetRealHeight(280);
+                        devicetypehorizontalScrol1.Height = Application.GetRealHeight(280);
+                        middle.Height = Application.GetRealHeight(1920 - 40) - devicetypehorizontalScrol.Bottom;
                     }
                     AllDeviceTypeView(list, devicetypehorizontalScrol);
 
@@ -1145,7 +1170,7 @@
                                 btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                                 openBtnSelected.Visible = false;
                                 closeBtnSelected.Visible = true;
-                                var ignoreTime = new IgnoreTime();
+                                var ignoreTime = new TemplateIgnore();
                                 UserView.HomePage.Instance.AddChidren(ignoreTime);
                                 UserView.HomePage.Instance.PageIndex += 1;
                                 ignoreTime.Show(common, btnclose.Text, edit, timevalue);
@@ -1227,7 +1252,7 @@
                                         btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
                                         openBtnSelected.Visible = false;
                                         closeBtnSelected.Visible = false;
-                                        var ignoreTime = new IgnoreTime();
+                                        var ignoreTime = new TemplateIgnore();
                                         UserView.HomePage.Instance.AddChidren(ignoreTime);
                                         UserView.HomePage.Instance.PageIndex += 1;
                                         ignoreTime.Show(common, btntimeout.Text, edit, timevalue);
@@ -1396,10 +1421,10 @@
                     break;
                 case DeviceType.DoorLock:
                     {
+                        flMain.RemoveFromParent();
                         var memberList = new MemberList();
                         UserView.HomePage.Instance.AddChidren(memberList);
                         UserView.HomePage.Instance.PageIndex += 1;
-                        MemberList.action += () => { flMain.RemoveFromParent(); };
                         memberList.Show(common);
                     }
                     break;

--
Gitblit v1.8.0