| | |
| | | /// <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(); |
| | |
| | | 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> |
| | | /// 设备类型滑动的控件 |
| | |
| | | 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) => |
| | |
| | | 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); |
| | | } |
| | |
| | | roomClickView.roomnameBtn.X = Application.GetRealWidth(60); |
| | | roomTextButton = roomClickView.roomnameBtn; |
| | | roomClickView.roomnameBtn.IsSelected = true; |
| | | |
| | | roomClickView.roombjBtn.IsSelected = true; |
| | | roomClickView.roomnameBtn.IsSelected = true; |
| | | |
| | | |
| | | var list = Method.GetDeviceUIList(room, deviceTypeList); |
| | | AllDeviceTypeView(list); |
| | |
| | | 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); |
| | | |
| | |
| | | |
| | | 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); |
| | | }; |