From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期二, 30 八月 2022 09:37:38 +0800
Subject: [PATCH] 合并了IOS的代码

---
 ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs |  426 +++++++++++++++++++++++++++++------------------------
 1 files changed, 234 insertions(+), 192 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs
index 4a21360..992f447 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs
@@ -12,9 +12,22 @@
         {
             Tag = "Logic";
         }
+        /// <summary>
+        /// 璁板綍鐐瑰嚮鎴块棿
+        /// </summary>
         Button roombjButton = new Button();
+        /// <summary>
+        /// 璁板綍鐐瑰嚮鎴块棿鍚嶇О
+        /// </summary>
         Button roomTextButton = new Button();
-        Button devicetypeButton = new Button();
+        /// <summary>
+        /// 璁板綍鐐瑰嚮璁惧
+        /// </summary>
+        Button deviceTypeBjButton = new Button();
+        /// <summary>
+        /// 璁板綍鐐瑰嚮璁惧绫诲瀷
+        /// </summary>
+        Button deviceTypeTextButton = new Button();
         FrameLayout clickframeLayout = new FrameLayout();
         Button clickbutton = new Button();
         Button clicktextcolcrbutton = new Button();
@@ -27,21 +40,33 @@
         /// </summary>
         public HorizontalScrolViewLayout roomhorizontalScrol = new HorizontalScrolViewLayout
         {
-            Width = Application.GetRealWidth(1080 - 58),
-            Height = Application.GetRealHeight(200),
-            X = Application.GetRealWidth(58),
+            Width = Application.GetRealWidth(1080 - 29),
+            Height = Application.GetRealHeight(204),
+            X = Application.GetRealWidth(29),
             Y = Application.GetRealHeight(184),
+        };
+        /// <summary>
+        /// 鍦嗚17
+        /// </summary>
+        public HorizontalScrolViewLayout devicetypehorizontalScrol1 = new HorizontalScrolViewLayout
+        {
+            Width = Application.GetRealWidth(1080 - 52),
+            Height = Application.GetRealHeight(50),
+            Y = Application.GetRealHeight(184 + 204),
+            BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+            X = Application.GetRealWidth(52),
+
         };
         /// <summary>
         /// 璁惧绫诲瀷婊戝姩鐨勬帶浠�
         /// </summary>
         public HorizontalScrolViewLayout devicetypehorizontalScrol = new HorizontalScrolViewLayout
         {
-            Width = Application.GetRealWidth(1080 - 58),
+            Width = Application.GetRealWidth(1080 - 52),
             Height = Application.GetRealHeight(280),
-            Y = Application.GetRealHeight(184 + 200),
+            Y = Application.GetRealHeight(184 + 204),
             BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
-            X = Application.GetRealWidth(58),
+            X = Application.GetRealWidth(52),
             // Radius = (uint)Application.GetRealHeight(50),
 
         };
@@ -51,22 +76,22 @@
         public VerticalScrolViewLayout middle = new VerticalScrolViewLayout
         {
             X = Application.GetRealWidth(58),
-            Y = Application.GetRealHeight(184 + 200 + 280 + 40),
-            Height = Application.GetRealHeight(1920 - 40 - 184 - 280 - 200),
+            Y = Application.GetRealHeight(184 + 204 + 280 + 40),
+            Height = Application.GetRealHeight(Method.H - 40 - 184 - 280 - 204),
             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.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;
@@ -87,121 +112,127 @@
             var roomlists = Method.GetRoomList(IfType, Config.Instance.Home.CurrentFloorId);
             if (roomlists.Count == 0)
             {
-                ///娌℃湁鎴块棿鐩存帴杩斿洖鍘伙紱
-                return;
+                //杩斿洖娌℃湁鎴块棿闅愯棌涓嬮潰鏁村潡;
+                devicetypehorizontalScrol1.Height = 0;
+                devicetypehorizontalScrol.Height = 0;
+                middle.Height = 0;
             }
             /// 璁惧绫诲瀷鍒楄〃
             var deviceTypeList = Method.GetDevice(IfType);
             this.AddChidren(roomhorizontalScrol);
+            this.AddChidren(devicetypehorizontalScrol1);
             this.AddChidren(devicetypehorizontalScrol);
             this.AddChidren(middle);
-            devicetypehorizontalScrol.SetCornerWithSameRadius(Application.GetRealHeight(50), HDLUtils.RectCornerBottomLeft);
+            devicetypehorizontalScrol1.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerTopLeft);
+            devicetypehorizontalScrol.SetCornerWithSameRadius(Application.GetRealHeight(50), HDLUtils.RectCornerBottomLeft|HDLUtils.RectCornerTopLeft);
             middle.SetCornerWithSameRadius(Application.GetRealHeight(50), HDLUtils.RectCornerTopLeft);
             ///妤煎眰鐐瑰嚮浜嬩欢
-            view.foolrclickBtn.MouseUpEventHandler+= (sender, e) =>
-            {
-                var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
-                this.AddChidren(flMain);
-                flMain.MouseUpEventHandler += (sender2, e2) =>
+            view.foolrclickBtn.MouseUpEventHandler += (sender, e) =>
                 {
-                    flMain.RemoveFromParent();
-                };
-                var foolrbjicon = new FrameLayout
-                {
-
-                    Width = Application.GetRealWidth(450),
-                    Height = Application.GetRealHeight(780),
-                    X = Application.GetRealWidth(1080 - 468 - 35),
-                    Y = Application.GetRealHeight(184),
-                    BackgroundImagePath = "Item/SelectFloor_Right.png",
-                };
-                flMain.AddChidren(foolrbjicon);
-
-                var btnfoolrtext = new Button
-                {
-                    Width = Application.GetRealWidth(450),
-                    Height = Application.GetRealHeight(150),
-                    TextAlignment = TextAlignment.CenterLeft,
-                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-                    X = Application.GetRealWidth(80),
-                    TextID = MyInternationalizationString.selecfoolr,
-                    TextSize = 14,
-                };
-                foolrbjicon.AddChidren(btnfoolrtext);
-
-                var foolrbj = new VerticalScrolViewLayout
-                {
-
-                    Width = Application.GetRealWidth(450),
-                    Height = foolrbjicon.Height - btnfoolrtext.Height,
-                    X = Application.GetRealWidth(80),
-                    Y = btnfoolrtext.Bottom,
-                };
-                foolrbjicon.AddChidren(foolrbj);
-
-                foreach (var foolr in Config.Instance.Home.FloorDics)
-                {
-                    var foolrRowLayout = new RowLayout
+                    var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+                    this.AddChidren(flMain);
+                    flMain.MouseUpEventHandler += (sender2, e2) =>
+                  {
+                      flMain.RemoveFromParent();
+                  };
+                    var foolrbjicon = new FrameLayout
                     {
-                        Height = Application.GetRealHeight(150),
-                        LineColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+
+                        Width = Application.GetRealWidth(450),
+                        Height = Application.GetRealWidth(780),
+                        X = Application.GetRealWidth(1080 - 468 - 35),
+                        Y = Application.GetRealHeight(184),
+                        BackgroundImagePath = "Item/SelectFloor_Right.png",
                     };
-                    foolrbj.AddChidren(foolrRowLayout);
+                    flMain.AddChidren(foolrbjicon);
 
-                    var btnfoolricon = new Button
+                    var btnfoolrtext = new Button
                     {
-                        Width = Application.GetRealWidth(81),
-                        Height = Application.GetRealHeight(81),
-                        UnSelectedImagePath = "Floor/Floor.png",
-                        Gravity = Gravity.CenterVertical,
-                    };
-                    foolrRowLayout.AddChidren(btnfoolricon);
-
-                    var btnfoolrname = new Button
-                    {
-                        Width = Application.GetRealWidth(250),
+                        Width = Application.GetRealWidth(450),
                         Height = Application.GetRealHeight(150),
-                        Text = foolr.Value,
                         TextAlignment = TextAlignment.CenterLeft,
-                        TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
-                        Tag = foolr.Key,
-                        X = btnfoolricon.Right + Application.GetRealWidth(12),
+                        TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                        X = Application.GetRealWidth(80),
+                        TextID = MyInternationalizationString.selecfoolr,
                         TextSize = 14,
                     };
-                    foolrRowLayout.AddChidren(btnfoolrname);
-                    if (view.foolrnameBtn.Text == foolr.Value)
+                    foolrbjicon.AddChidren(btnfoolrtext);
+
+                    var foolrbj = new VerticalScrolViewLayout
                     {
-                        btnfoolricon.UnSelectedImagePath = "Floor/FloorSelected.png";
-                        btnfoolrname.TextColor = ZigbeeColor.Current.LogicTextBlackColor;
+
+                        Width = Application.GetRealWidth(450),
+                        Height = foolrbjicon.Height - btnfoolrtext.Height,
+                        X = Application.GetRealWidth(80),
+                        Y = btnfoolrtext.Bottom,
+                    };
+                    foolrbjicon.AddChidren(foolrbj);
+
+                    foreach (var foolr in Config.Instance.Home.FloorDics)
+                    {
+                        var foolrRowLayout = new RowLayout
+                        {
+                            Height = Application.GetRealHeight(150),
+                            LineColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+                        };
+                        foolrbj.AddChidren(foolrRowLayout);
+
+                        var btnfoolricon = new Button
+                        {
+                            Width = Application.GetRealWidth(81),
+                            Height = Application.GetRealWidth(81),
+                            UnSelectedImagePath = "Floor/Floor.png",
+                            Gravity = Gravity.CenterVertical,
+                        };
+                        foolrRowLayout.AddChidren(btnfoolricon);
+
+                        var btnfoolrname = new Button
+                        {
+                            Width = Application.GetRealWidth(250),
+                            Height = Application.GetRealHeight(150),
+                            Text = foolr.Value,
+                            TextAlignment = TextAlignment.CenterLeft,
+                            TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                            Tag = foolr.Key,
+                            X = btnfoolricon.Right + Application.GetRealWidth(12),
+                            TextSize = 14,
+                        };
+                        foolrRowLayout.AddChidren(btnfoolrname);
+                        if (view.foolrnameBtn.Text == foolr.Value)
+                        {
+                            btnfoolricon.UnSelectedImagePath = "Floor/FloorSelected.png";
+                            btnfoolrname.TextColor = ZigbeeColor.Current.LogicTextBlackColor;
+                        }
+
+                        EventHandler<MouseEventArgs> foolrnameclick = (sender13, e13) =>
+                      {
+
+                          roomhorizontalScrol.RemoveAll();
+                          devicetypehorizontalScrol.RemoveAll();
+                          middle.RemoveAll();
+                          view.foolrnameBtn.Text = btnfoolrname.Text;
+                          flMain.RemoveFromParent();
+                          var list = Method.GetRoomList(IfType, btnfoolrname.Tag.ToString());
+                          if (list.Count == 0)
+                          {
+                              devicetypehorizontalScrol1.Height = 0;
+                              devicetypehorizontalScrol.Height = 0;
+                              middle.Height = 0;
+                          }
+                          else
+                          {
+                              devicetypehorizontalScrol1.Height = 50;
+                              devicetypehorizontalScrol.Height = Application.GetRealHeight(280);
+                              middle.Height = Application.GetRealHeight(1920 - 40 - 184 - 280 - 200);
+                          }
+                          AllRoomView(list, deviceTypeList);
+                      };
+                        foolrRowLayout.MouseUpEventHandler += foolrnameclick;
+                        btnfoolrname.MouseUpEventHandler += foolrnameclick;
+
                     }
 
-                    EventHandler<MouseEventArgs> foolrnameclick = (sender13, e13) =>
-                    {
-
-                        roomhorizontalScrol.RemoveAll();
-                        devicetypehorizontalScrol.RemoveAll();
-                        middle.RemoveAll();
-                        view.foolrnameBtn.Text = btnfoolrname.Text;
-                        flMain.RemoveFromParent();
-                        var list = Method.GetRoomList(IfType, btnfoolrname.Tag.ToString());
-                        if (list.Count == 0)
-                        {
-                            devicetypehorizontalScrol.Height= 0;
-                            middle.Height = 0;
-                        }
-                        else
-                        {
-                            devicetypehorizontalScrol.Height= Application.GetRealHeight(280);
-                            middle.Height= Application.GetRealHeight(1920 - 40 - 184 - 280 - 200);
-                        }
-                        AllRoomView(list, deviceTypeList);
-                    };
-                    foolrRowLayout.MouseUpEventHandler += foolrnameclick;
-                    btnfoolrname.MouseUpEventHandler += foolrnameclick;
-
-                }
-
-            };
+                };
             AllRoomView(roomlists, deviceTypeList);
         }
         /// <summary>
@@ -213,70 +244,64 @@
             {
                 var room = roomlist[i];
 
-                var fra = new FrameLayout
-                {
-                    Height = Application.GetRealHeight(200),
-                    Width = Application.GetRealWidth(255),
-                };
-                roomhorizontalScrol.AddChidren(fra);
+                LogicView.RoomClickView roomClickView = new LogicView.RoomClickView();
+                roomClickView.Show(roomhorizontalScrol);
+                roomClickView.roomnameBtn.Text = room.Name;
 
-                var roombjBtn = new Button
-                {
-                    Height = Application.GetRealHeight(158),
-                    Width = Application.GetRealWidth(255),
-                    UnSelectedImagePath = "ZigeeLogic/iconBackgroundColor.png",
-                    SelectedImagePath = "ZigeeLogic/iconSelectedBackgroundColor.png",
-                    Y = Application.GetRealHeight(21),
-                };
-                fra.AddChidren(roombjBtn);
-
-                var roomnameBtn = new Button
+                if (i == 0)//榛樿閫変腑绗竴涓埧闂�
                 {
 
-                    Height = Application.GetRealHeight(152 - 26 - 20),
-                    Width = Application.GetRealWidth(255 - 20 - 50),
-                    Text = room.Name,
-                    TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
-                    SelectedTextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
-                    Y = Application.GetRealHeight(21 + 13 + 10),
-                    X = Application.GetRealWidth(10 + 25),
-
-                };
-                fra.AddChidren(roomnameBtn);
-
-                if (i == 0)//
-                {
                     roombjButton.IsSelected = false;
-                    roombjButton = roombjBtn;
-                    roombjBtn.IsSelected = true;
-
+                    roomClickView.roombjBtn.Height = Application.GetRealHeight(135);
+                    roomClickView.roombjBtn.Width = Application.GetRealWidth(245);
+                    roomClickView.roombjBtn.Y = Application.GetRealHeight(40);
+                    roomClickView.roombjBtn.X = Application.GetRealWidth(0);
+                    roombjButton = roomClickView.roombjBtn;
+                    roomClickView.roombjBtn.IsSelected = true;
                     roomTextButton.IsSelected = false;
-                    roomTextButton = roomnameBtn;
-                    roomnameBtn.IsSelected = true;
+                    roomClickView.roomnameBtn.Width = Application.GetRealWidth(245 - 60 * 2);
+                    roomClickView.roomnameBtn.X = Application.GetRealWidth(60);
+                    roomTextButton = roomClickView.roomnameBtn;
+                    roomClickView.roomnameBtn.IsSelected = true;
 
-                    roombjBtn.IsSelected = true;
-                    roomnameBtn.IsSelected = true;
-
-                    var list = Method.GetDeviceUIList(room, deviceTypeList);
+                    var list = Method.GetDeviceUIList(room, deviceTypeList, IfType);
                     AllDeviceTypeView(list);
                 }
 
                 EventHandler<MouseEventArgs> roomclick = (sender, e) =>
                 {
+                    roombjButton.Height = Application.GetRealHeight(72);
+                    roombjButton.Width = Application.GetRealWidth(170);
+                    roombjButton.Y = Application.GetRealHeight(60);
+                    roombjButton.X = Application.GetRealWidth(26);
                     roombjButton.IsSelected = false;
-                    roombjButton = roombjBtn;
-                    roombjBtn.IsSelected = true;
 
+                    roombjButton.Height = Application.GetRealHeight(72);
+                    roombjButton.Width = Application.GetRealWidth(170);
+                    roombjButton.Y = Application.GetRealHeight(60);
+                    roombjButton.X = Application.GetRealWidth(26);
+                    roombjButton.IsSelected = false;
+
+                    roomClickView.roombjBtn.Height = Application.GetRealHeight(135);
+                    roomClickView.roombjBtn.Width = Application.GetRealWidth(245);
+                    roomClickView.roombjBtn.Y = Application.GetRealHeight(40);
+                    roomClickView.roombjBtn.X = Application.GetRealWidth(0);
+                    roombjButton = roomClickView.roombjBtn;
+                    roomClickView.roombjBtn.IsSelected = true;
+
+                    roomTextButton.Width = Application.GetRealWidth(125);
+                    roomTextButton.X = Application.GetRealWidth(26 + 22);
                     roomTextButton.IsSelected = false;
-                    roomTextButton = roomnameBtn;
-                    roomnameBtn.IsSelected = true;
+                    roomClickView.roomnameBtn.Width = Application.GetRealWidth(245 - 60 * 2);
+                    roomClickView.roomnameBtn.X = Application.GetRealWidth(60);
+                    roomTextButton = roomClickView.roomnameBtn;
+                    roomClickView.roomnameBtn.IsSelected = true;
 
-
-                    var list = Method.GetDeviceUIList(room, deviceTypeList);
+                    var list = Method.GetDeviceUIList(room, deviceTypeList, IfType);
                     AllDeviceTypeView(list);
                 };
-                roomnameBtn.MouseUpEventHandler += roomclick;
-                roombjBtn.MouseUpEventHandler += roomclick;
+                roomClickView.roomnameBtn.MouseUpEventHandler += roomclick;
+                roomClickView.roombjBtn.MouseUpEventHandler += roomclick;
 
             }
         }
@@ -286,35 +311,32 @@
         /// <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++)
             {
                 var devicetype = devicetypelist[i];
-                var spaceRowLayout = new FrameLayout();
-                devicetypehorizontalScrol.AddChidren(spaceRowLayout);
+
                 if (i == 0)
                 {
+                    var spaceRowLayout = new FrameLayout();
+                    devicetypehorizontalScrol.AddChidren(spaceRowLayout);
                     spaceRowLayout.Width = Application.GetRealWidth(37);
                 }
-                else
-                {
-                    spaceRowLayout.Width = Application.GetRealWidth(80);
-                }
+               
 
                 var deviceRowLayout = new FrameLayout
                 {
-                    Width = Application.GetRealWidth(156 + 20),
-                    Height = Application.GetRealHeight(280 - 30),
-                    Y = Application.GetRealHeight(30),
+                    Width = Application.GetRealWidth(150+75),
+                    Height = Application.GetRealHeight(173+52),
+                    Y = Application.GetRealHeight(35),
                 };
                 devicetypehorizontalScrol.AddChidren(deviceRowLayout);
 
                 var backgroundColor = new Button
                 {
-                    Width = Application.GetRealWidth(156),
-                    Height = Application.GetRealHeight(180),
-                    X = Application.GetRealWidth(10),
+                    Width = Application.GetRealWidth(150),
+                    Height = Application.GetRealWidth(173),
                     UnSelectedImagePath = "ZigeeLogic/deviceunselectedbackgroundcolor.png",
                     SelectedImagePath = "ZigeeLogic/deviceselectedbackgroundcolor.png",
                 };
@@ -324,34 +346,50 @@
                 var devicetypeicon = new Button
                 {
                     Width = Application.GetRealWidth(84),
-                    Height = Application.GetRealHeight(84),
-                    X = Application.GetRealWidth(46),
-                    Y = Application.GetRealHeight(30),
+                    Height = Application.GetRealWidth(84),
+                    X = Application.GetRealWidth(35),
+                    Y = Application.GetRealHeight(29),
                     UnSelectedImagePath =Method.GetDeviceTypeIcon(devicetype),
                 };
                 deviceRowLayout.AddChidren(devicetypeicon);
 
                 var devicetypename = new Button
                 {
-                    Width = Application.GetRealWidth(176),
-                    Height = Application.GetRealHeight(40),
+                    Width = Application.GetRealWidth(150),
+                    Height = Application.GetRealHeight(52),
                     Text = devicetype,
                     TextAlignment = TextAlignment.Center,
                     Y = backgroundColor.Bottom,
-                    TextColor = ZigbeeColor.Current.LogicAddColor,
                     TextSize = 10,
+                    TextColor =ZigbeeColor.Current.LogicBtnSelectedColor,
+                    SelectedTextColor =ZigbeeColor.Current.LogicAddColor,
                 };
                 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;
-                    devicetypeButton = backgroundColor;
+                    deviceTypeBjButton.IsSelected = false;
+                    deviceTypeBjButton = backgroundColor;
                     backgroundColor.IsSelected = true;
+
+                    deviceTypeTextButton.IsSelected = false;
+                    deviceTypeTextButton = devicetypename;
+                    devicetypename.IsSelected = true;
+
+
                     var list = Method.GetDeviceType(devicetypename.Text);
                     ConditionDeviceView(list, devicelist);
                 };
-                deviceRowLayout.MouseUpEventHandler += devicetypeclick;
                 devicetypename.MouseUpEventHandler += devicetypeclick;
                 devicetypeicon.MouseUpEventHandler += devicetypeclick;
                 backgroundColor.MouseUpEventHandler += devicetypeclick;
@@ -359,6 +397,7 @@
             }
             ///鏄剧ず鎴块棿鎵�鏈夎澶�
             ConditionDeviceView(new List<DeviceType>(), devicelist);
+
 
         }
         /// <summary>
@@ -368,19 +407,13 @@
         /// <param name="devicelist">璁惧鍒楄〃</param>
         void ConditionDeviceView(List<DeviceType> deviceTypelist, List<CommonDevice> devicelist)
         {
+
             middle.RemoveAll();
             foreach (var common in devicelist)
             {
                 if (deviceTypelist.Count != 0 && !deviceTypelist.Contains(common.Type))
                 {
                     continue;
-                }
-                if (IfType == "condition_mould")
-                {
-                    if (common.IasDeviceType != 13)
-                    {//鑷姩鍖栨ā鏉垮彧鏀寔绾㈠浼犳劅鍣�
-                        continue;
-                    }
                 }
                 var deviceFramelayout = new FrameLayout
                 {
@@ -390,17 +423,17 @@
                 var bjFramelayout = new FrameLayout
                 {
                     Width = Application.GetRealWidth(112),
-                    Height = Application.GetRealHeight(112),
+                    Height = Application.GetRealWidth(112),
                     X = Application.GetRealWidth(58),
                     Y = Application.GetRealHeight(30 + 9),
-                    // Radius = (uint)Application.GetRealHeight(56),
+                     Radius = (uint)Application.GetRealWidth(56),
                     BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
                 };
                 deviceFramelayout.AddChidren(bjFramelayout);
                 var deviceIconBtn = new Button
                 {
                     Width = Application.GetRealWidth(82),
-                    Height = Application.GetRealHeight(82),
+                    Height = Application.GetRealWidth(82),
                     Gravity = Gravity.Center,
                 };
                 bjFramelayout.AddChidren(deviceIconBtn);
@@ -410,9 +443,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
@@ -424,6 +457,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;
@@ -437,8 +480,7 @@
                     devicename.IsSelected = true;
                     var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
                     this.AddChidren(flMain);
-                    CurrentDeviceState.CurrentDeviceView(flMain, common, false, IfType);
-
+                    CurrentDeviceState.CurrentDeviceView(flMain, common, false, IfType,0);
                 };
                 deviceFramelayout.MouseUpEventHandler += devicclick;
                 bjFramelayout.MouseUpEventHandler += devicclick;

--
Gitblit v1.8.0