From d5b9ff8bf8cc36f5b13c46b66682f5988d3a6f36 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 15 五月 2020 11:36:11 +0800
Subject: [PATCH] 2020-05-15-1

---
 ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs |   61 ++++++++++++++++++++----------
 1 files changed, 41 insertions(+), 20 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs
index 342da8f..a6cf276 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs
@@ -52,21 +52,21 @@
         {
             X = Application.GetRealWidth(58),
             Y = Application.GetRealHeight(184 + 200 + 280 + 40),
-            Height = Application.GetRealHeight(1920 - 40 - 184 - 280 - 200),
+            Height = Application.GetRealHeight(Method.H - 40 - 184 - 280 - 200),
             BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
         };
 
         public void Show(string Name)
         {
             #region  涓婇潰鐨勫竷灞�浠g爜
-            UserView.HomePage.Instance.ScrollEnabled = false;
+            UserView.HomePage.Instance.ScrollEnabled = false;//閿佷綇宸︽粦
             this.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
             TopView view = new TopView();
             this.AddChidren(view.TopRowView(true));
             view.toptitleNameBtn.Text = Name;
             view.clickBtn.MouseDownEventHandler += (sender, e) =>
             {
-                UserView.HomePage.Instance.ScrollEnabled = true;
+                UserView.HomePage.Instance.ScrollEnabled = true;//鎭㈠宸︽粦
                 RemoveFromParent();
             };
             view.foolrnameBtn.Text = Config.Instance.Home.GetCurrentFloorName;
@@ -151,8 +151,8 @@
 
                         var btnfoolricon = new Button
                         {
-                            Width = Application.GetRealWidth(81),
-                            Height = Application.GetRealHeight(81),
+                            Width = Application.GetMinRealAverage(81),
+                            Height = Application.GetMinRealAverage(81),
                             UnSelectedImagePath = "Floor/Floor.png",
                             Gravity = Gravity.CenterVertical,
                         };
@@ -245,7 +245,7 @@
                 };
                 fra.AddChidren(roomnameBtn);
 
-                if (i == 0)//
+                if (i == 0)//榛樿閫変腑绗竴涓埧闂�
                 {
                     roombjButton.IsSelected = false;
                     roombjButton = roombjBtn;
@@ -287,7 +287,7 @@
         /// <param name="devicelist">Devicelist.</param>
         void AllDeviceTypeView(List<CommonDevice> devicelist)
         {
-            var devicetypelist = Method.GetDeviceTypeList(IfType, devicelist);
+            var devicetypelist = Method.GetDeviceTypeList(devicelist);
             devicetypehorizontalScrol.RemoveAll();
             for (int i = 0; i < devicetypelist.Count; i++)
             {
@@ -313,8 +313,8 @@
 
                 var backgroundColor = new Button
                 {
-                    Width = Application.GetRealWidth(156),
-                    Height = Application.GetRealHeight(180),
+                    Width = Application.GetMinRealAverage(156),
+                    Height = Application.GetMinRealAverage(180),
                     X = Application.GetRealWidth(10),
                     UnSelectedImagePath = "ZigeeLogic/deviceunselectedbackgroundcolor.png",
                     SelectedImagePath = "ZigeeLogic/deviceselectedbackgroundcolor.png",
@@ -324,8 +324,8 @@
 
                 var devicetypeicon = new Button
                 {
-                    Width = Application.GetRealWidth(84),
-                    Height = Application.GetRealHeight(84),
+                    Width = Application.GetMinRealAverage(84),
+                    Height = Application.GetMinRealAverage(84),
                     X = Application.GetRealWidth(46),
                     Y = Application.GetRealHeight(30),
                     UnSelectedImagePath =Method.GetDeviceTypeIcon(devicetype),
@@ -343,7 +343,17 @@
                     TextSize = 10,
                 };
                 deviceRowLayout.AddChidren(devicetypename);
-               
+
+
+                //if (i == 0)//榛樿閫変腑绗竴涓澶囩被鍨�
+                //{
+                //    devicetypeButton.IsSelected = false;
+                //    devicetypeButton = backgroundColor;
+                //    backgroundColor.IsSelected = true;
+                //    var list = Method.GetDeviceType(devicetypename.Text);
+                //    ConditionDeviceView(list, devicelist);
+                //}
+
                 EventHandler<MouseEventArgs> devicetypeclick = (sender13, e13) =>
                 {
                     devicetypeButton.IsSelected = false;
@@ -360,6 +370,7 @@
             }
             ///鏄剧ず鎴块棿鎵�鏈夎澶�
             ConditionDeviceView(new List<DeviceType>(), devicelist);
+
 
         }
         /// <summary>
@@ -390,18 +401,18 @@
                 middle.AddChidren(deviceFramelayout);
                 var bjFramelayout = new FrameLayout
                 {
-                    Width = Application.GetRealWidth(112),
-                    Height = Application.GetRealHeight(112),
+                    Width = Application.GetMinRealAverage(112),
+                    Height = Application.GetMinRealAverage(112),
                     X = Application.GetRealWidth(58),
                     Y = Application.GetRealHeight(30 + 9),
-                    // Radius = (uint)Application.GetRealHeight(56),
+                     Radius = (uint)Application.GetMinRealAverage(56),
                     BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
                 };
                 deviceFramelayout.AddChidren(bjFramelayout);
                 var deviceIconBtn = new Button
                 {
-                    Width = Application.GetRealWidth(82),
-                    Height = Application.GetRealHeight(82),
+                    Width = Application.GetMinRealAverage(82),
+                    Height = Application.GetMinRealAverage(82),
                     Gravity = Gravity.Center,
                 };
                 bjFramelayout.AddChidren(deviceIconBtn);
@@ -411,9 +422,9 @@
                     Y = Application.GetRealHeight(30),
                     Width = Application.GetRealWidth(850),
                     Height = Application.GetRealHeight(130),
-                    X = Application.GetRealWidth(176 + 10),
-                    LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
-
+                    X = Application.GetRealWidth(176 + 25),
+                    //LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+                    LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                 };
                 deviceFramelayout.AddChidren(deviceRow);
                 var devicename = new Button
@@ -425,6 +436,16 @@
                     TextSize = 14,
                 };
                 deviceRow.AddChidren(devicename);
+
+                var lineBtn = new Button
+                {
+                    Y = deviceFramelayout.Height-1,
+                    Height = 1,
+                    Width = Application.GetRealWidth(850),
+                    X = Application.GetRealWidth(176 + 25),
+                    BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+                };
+                deviceFramelayout.AddChidren(lineBtn);
                 EventHandler<MouseEventArgs> devicclick = (sen, e) =>
                 {
                     clickbutton.IsSelected = false;

--
Gitblit v1.8.0