| | |
| | | /// <summary> |
| | | /// BeforesceneTargetDeviceUIs |
| | | /// </summary> |
| | | public List<SceneTargetDeviceUI> beforeSceneTargetDeviceUIs=new List<SceneTargetDeviceUI> { }; |
| | | public List<SceneTargetDeviceUI> beforeSceneTargetDeviceUIs = new List<SceneTargetDeviceUI> { }; |
| | | /// <summary> |
| | | /// 楼层 |
| | | /// </summary> |
| | |
| | | Gravity = Gravity.CenterVertical, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = ZigbeeColor.Current.GXCTextBlackColor, |
| | | TextSize = 14, |
| | | IsBold = true |
| | | }; |
| | | |
| | | selectFloorBtn = new Button() |
| | |
| | | confirmBtn.SetTitle(R.MyInternationalizationString.Save); |
| | | confirmBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | sceneTargetDevice.ElseScenesId = sceneUI.Id ; |
| | | sceneTargetDevice.ElseScenesId = sceneUI.Id; |
| | | sceneTargetDevice.SceneUI = sceneUI; |
| | | sceneTargetDevice.SceneName = sceneUI.Name; |
| | | selectedAction?.Invoke(sceneTargetDevice); |
| | |
| | | functionSceneBodyView = new FrameLayout() |
| | | { |
| | | Y = roomFL.Bottom, |
| | | Height = Application.GetRealHeight(910+622), |
| | | Height = Application.GetRealHeight(1080 + 452), |
| | | BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor |
| | | }; |
| | | 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) |
| | |
| | | |
| | | RefreshScene(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; |
| | | |
| | | RefreshScene(room); |
| | | }; |
| | |
| | | { |
| | | //Y = Application.GetRealHeight(58) |
| | | }; |
| | | |
| | | functionSceneBodyView.AddChidren(sceneScrolView); |
| | | SelectSceneRow tempSceneRow = new SelectSceneRow(); |
| | | EventHandler<MouseEventArgs> selectScene = (sender, e) => { |
| | | EventHandler<MouseEventArgs> selectScene = (sender, e) => |
| | | { |
| | | tempSceneRow.IsSelected = false; |
| | | tempSceneRow = ((sender as Button).Parent as SelectSceneRow); |
| | | ((sender as Button).Parent as SelectSceneRow).IsSelected = true; |
| | |
| | | sceneRowLayout.IsSelected = true; |
| | | } |
| | | } |
| | | |
| | | |
| | | sceneRowLayout.ClickButton.MouseUpEventHandler += selectScene; |
| | | } |
| | | |
| | | if (sceneList.Count > 8) |
| | | { |
| | | var frame = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(300) |
| | | }; |
| | | sceneScrolView.AddChidren(frame); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 显示没有场景 |
| | |
| | | Height = Application.GetRealHeight(200), |
| | | Width = Application.GetRealWidth(700), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Text = Language.StringByID(R.MyInternationalizationString.NoScene).Replace("{\\r\\n}", "\r\n"), |
| | | Text = Language.StringByID(R.MyInternationalizationString.NoScene_Tip).Replace("{\\r\\n}", "\r\n"), |
| | | TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor, |
| | | TextAlignment = TextAlignment.Center, |
| | | IsMoreLines = true |