From 81307af66465a6b5ba189b0fb9b347787f004a4e Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期三, 30 十二月 2020 16:14:15 +0800 Subject: [PATCH] 2020-12-30-1 --- ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs | 77 +++++++++++++++++++++++--------------- 1 files changed, 47 insertions(+), 30 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs index 875c64b..992f447 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/RoomAndDeviceView.cs @@ -23,7 +23,11 @@ /// <summary> /// 璁板綍鐐瑰嚮璁惧 /// </summary> - Button devicetypeButton = new Button(); + Button deviceTypeBjButton = new Button(); + /// <summary> + /// 璁板綍鐐瑰嚮璁惧绫诲瀷 + /// </summary> + Button deviceTypeTextButton = new Button(); FrameLayout clickframeLayout = new FrameLayout(); Button clickbutton = new Button(); Button clicktextcolcrbutton = new Button(); @@ -40,6 +44,18 @@ 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> /// 璁惧绫诲瀷婊戝姩鐨勬帶浠� @@ -97,15 +113,18 @@ if (roomlists.Count == 0) { //杩斿洖娌℃湁鎴块棿闅愯棌涓嬮潰鏁村潡; + 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) => @@ -120,7 +139,7 @@ { Width = Application.GetRealWidth(450), - Height = Application.GetRealHeight(780), + Height = Application.GetRealWidth(780), X = Application.GetRealWidth(1080 - 468 - 35), Y = Application.GetRealHeight(184), BackgroundImagePath = "Item/SelectFloor_Right.png", @@ -160,8 +179,8 @@ var btnfoolricon = new Button { - Width = Application.GetMinRealAverage(81), - Height = Application.GetMinRealAverage(81), + Width = Application.GetRealWidth(81), + Height = Application.GetRealWidth(81), UnSelectedImagePath = "Floor/Floor.png", Gravity = Gravity.CenterVertical, }; @@ -196,11 +215,13 @@ 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); } @@ -243,11 +264,7 @@ roomTextButton = roomClickView.roomnameBtn; roomClickView.roomnameBtn.IsSelected = true; - roomClickView.roombjBtn.IsSelected = true; - roomClickView.roomnameBtn.IsSelected = true; - - - var list = Method.GetDeviceUIList(room, deviceTypeList); + var list = Method.GetDeviceUIList(room, deviceTypeList, IfType); AllDeviceTypeView(list); } @@ -280,7 +297,7 @@ roomTextButton = roomClickView.roomnameBtn; roomClickView.roomnameBtn.IsSelected = true; - var list = Method.GetDeviceUIList(room, deviceTypeList); + var list = Method.GetDeviceUIList(room, deviceTypeList, IfType); AllDeviceTypeView(list); }; roomClickView.roomnameBtn.MouseUpEventHandler += roomclick; @@ -318,8 +335,8 @@ var backgroundColor = new Button { - Width = Application.GetMinRealAverage(150), - Height = Application.GetMinRealAverage(173), + Width = Application.GetRealWidth(150), + Height = Application.GetRealWidth(173), UnSelectedImagePath = "ZigeeLogic/deviceunselectedbackgroundcolor.png", SelectedImagePath = "ZigeeLogic/deviceselectedbackgroundcolor.png", }; @@ -328,8 +345,8 @@ var devicetypeicon = new Button { - Width = Application.GetMinRealAverage(84), - Height = Application.GetMinRealAverage(84), + Width = Application.GetRealWidth(84), + Height = Application.GetRealWidth(84), X = Application.GetRealWidth(35), Y = Application.GetRealHeight(29), UnSelectedImagePath =Method.GetDeviceTypeIcon(devicetype), @@ -343,8 +360,9 @@ 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); @@ -360,9 +378,15 @@ 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); }; @@ -391,13 +415,6 @@ { continue; } - if (IfType == "condition_mould") - { - if (common.IasDeviceType != 13) - {//鑷姩鍖栨ā鏉垮彧鏀寔绾㈠浼犳劅鍣� - continue; - } - } var deviceFramelayout = new FrameLayout { Height = Application.GetRealHeight(160), @@ -405,18 +422,18 @@ middle.AddChidren(deviceFramelayout); var bjFramelayout = new FrameLayout { - Width = Application.GetMinRealAverage(112), - Height = Application.GetMinRealAverage(112), + Width = Application.GetRealWidth(112), + Height = Application.GetRealWidth(112), X = Application.GetRealWidth(58), Y = Application.GetRealHeight(30 + 9), - Radius = (uint)Application.GetMinRealAverage(56), + Radius = (uint)Application.GetRealWidth(56), BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, }; deviceFramelayout.AddChidren(bjFramelayout); var deviceIconBtn = new Button { - Width = Application.GetMinRealAverage(82), - Height = Application.GetMinRealAverage(82), + Width = Application.GetRealWidth(82), + Height = Application.GetRealWidth(82), Gravity = Gravity.Center, }; bjFramelayout.AddChidren(deviceIconBtn); -- Gitblit v1.8.0