From b129359c5a0df75f63d9131e5e41d3060ac38cc3 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期一, 30 十二月 2019 14:14:06 +0800 Subject: [PATCH] 2019.12.30 --- ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs | 49 +++++++++++++++++++------------------------------ 1 files changed, 19 insertions(+), 30 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs index 19d08f7..efe2704 100644 --- a/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectDevice.cs @@ -152,7 +152,9 @@ if (info.BeloneType == DeviceBeloneType.A寮�鍏� || info.BeloneType == DeviceBeloneType.A褰╃伅 || info.BeloneType == DeviceBeloneType.A鎻掑骇 || info.BeloneType == DeviceBeloneType.A鏅鸿兘绌哄紑 || info.BeloneType == DeviceBeloneType.A鐏厜 || info.BeloneType == DeviceBeloneType.A绌鸿皟 - || info.BeloneType == DeviceBeloneType.A绐楀笜 || info.BeloneType == DeviceBeloneType.A缁х數鍣�) + || info.BeloneType == DeviceBeloneType.A绐楀笜 || info.BeloneType == DeviceBeloneType.A缁х數鍣� + || info.BeloneType == DeviceBeloneType.A璋冨厜鍣� + ) { if (typeDeviceDic.ContainsKey(info.BeloneTextId) == false) { @@ -278,30 +280,20 @@ }; bodyFrameLayout.AddChidren(functionSceneBodyView); - Button curBtn = new Button(); + RoomButton curBtn = new RoomButton(0, 0); foreach (var room in Common.Room.CurrentRoom.GetRoomsByFloorIdAppendLoveRoom(floorId)) { var row = new FrameLayout() { - Width = Application.GetRealWidth(187 + 50), - Height = Application.GetRealHeight(204), + Width = Application.GetRealWidth(255), + Height = Application.GetRealHeight(167) }; roomFL.AddChidren(row); - var roomBtn = new Button() - { - Width = Application.GetRealWidth(187), - Height = Application.GetRealHeight(78), - Radius = (uint)Application.GetRealHeight(78 / 2), - Gravity = Gravity.Center, - Text = room.Name, - TextColor = ZigbeeColor.Current.GXCTextGrayColor, - SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor, - BackgroundColor = ZigbeeColor.Current.GXCButtonUnSelectedColor3, - SelectedBackgroundColor = ZigbeeColor.Current.GXCButtonSelectedColor, - BorderColor = ZigbeeColor.Current.GXCBorderUnSelectedColor, - BorderWidth = 1 - }; + RoomButton roomBtn = new RoomButton(0, 0); + roomBtn.Gravity = Gravity.Center; + roomBtn.Init(); + roomBtn.SetTitle(room.Name); row.AddChidren(roomBtn); if (room.IsLove) @@ -311,15 +303,15 @@ this.curRoom = room; RefreshFunction(room); } - roomBtn.MouseUpEventHandler += (sender, e) => + roomBtn.ButtonClickEvent += (sender, e) => { - if ((sender as Button) == curBtn) + if (sender == curBtn) { return; } - (sender as Button).IsSelected = true; + sender.IsSelected = true; curBtn.IsSelected = false; - curBtn = sender as Button; + curBtn = sender; this.curRoom = room; RefreshFunction(room); }; @@ -484,7 +476,7 @@ Height = Application.GetRealHeight(200), Width = Application.GetRealWidth(700), Gravity = Gravity.CenterHorizontal, - Text = Language.StringByID(R.MyInternationalizationString.NoFunction_Tip).Replace("{\\r\\n}", "\r\n"), + Text = Language.StringByID(R.MyInternationalizationString.NoFunction).Replace("{\\r\\n}", "\r\n"), TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor, TextAlignment = TextAlignment.Center, IsMoreLines = true @@ -582,7 +574,7 @@ var deviceName = new Button { - Width = Application.GetRealWidth(400), + Width = Application.GetRealWidth(600), Gravity = Gravity.CenterHorizontal, TextColor = ZigbeeColor.Current.GXCTextBlackColor, TextSize = 16, @@ -738,7 +730,7 @@ var deviceName = new Button { - Width = Application.GetRealWidth(400), + Width = Application.GetRealWidth(600), Gravity = Gravity.CenterHorizontal, TextColor = ZigbeeColor.Current.GXCTextBlackColor, TextSize = 16, @@ -903,7 +895,7 @@ var deviceName = new Button { - Width = Application.GetRealWidth(400), + Width = Application.GetRealWidth(600), Gravity = Gravity.CenterHorizontal, TextColor = ZigbeeColor.Current.GXCTextBlackColor, TextSize = 16, @@ -1069,7 +1061,7 @@ var deviceName = new Button { - Width = Application.GetRealWidth(400), + Width = Application.GetRealWidth(600), Gravity = Gravity.CenterHorizontal, TextColor = ZigbeeColor.Current.GXCTextBlackColor, TextSize = 16, @@ -1161,12 +1153,9 @@ tempId = open.temperatureList.IndexOf(tasklist.Data2/100); } } - open.pickerView.setCurrentItems(tempId, modelId, fanid); } } - - comfrimBtn.MouseUpEventHandler = (sender, e) => { -- Gitblit v1.8.0