| | |
| | | var btnAddFrameLayout = new FrameLayout |
| | | { |
| | | X = Application.GetRealWidth(830), |
| | | Width = Application.GetRealWidth(200), |
| | | }; |
| | | this.titleFrameLayout.AddChidren(btnAddFrameLayout); |
| | | |
| | |
| | | btnAddFrameLayout.AddChidren(btnBindDown); |
| | | |
| | | if (Common.Config.Instance.Home.FloorDics.Count == 0) |
| | | {
|
| | | btnBindDown.Visible = false;
|
| | | }
|
| | |
|
| | | { |
| | | btnBindDown.Visible = false; |
| | | } |
| | | |
| | | btnBindDown.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | SideslipFramelayout(); |
| | | }; |
| | | if (Common.Config.Instance.Home.FloorDics.Count == 0) |
| | | { |
| | | btnAddFrameLayout.Width = 0; |
| | | } |
| | | else |
| | | { |
| | | btnAddFrameLayout.Width = Application.GetRealWidth(200); |
| | | } |
| | | MidFrameLayoutContent(btnFloorText); |
| | | } |
| | | |
| | |
| | | roomList.Add(room); |
| | | } |
| | | } |
| | | }
|
| | | else
|
| | | {
|
| | | // 获取楼层对应对房间
|
| | | foreach (var room in Shared.Common.Room.Lists)
|
| | | {
|
| | | if (room.FloorId == currentKey.currentSelectFloorId)
|
| | | {
|
| | | roomList.Add(room);
|
| | | }
|
| | | }
|
| | | } |
| | | else |
| | | { |
| | | // 获取楼层对应对房间 |
| | | foreach (var room in Shared.Common.Room.Lists) |
| | | { |
| | | if (room.FloorId == currentKey.currentSelectFloorId) |
| | | { |
| | | roomList.Add(room); |
| | | } |
| | | } |
| | | } |
| | | //首次拿到所有房间中按键的目标并存储 |
| | | GetALlDispalyRoomDeviceList(); |
| | |
| | | { |
| | | btnChooseKeyMode.Enable = true; |
| | | btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | }
|
| | | if (targetList.Count == 0)
|
| | | {
|
| | | } |
| | | if (targetList.Count == 0) |
| | | { |
| | | btnChooseKeyMode.Enable = false; |
| | | btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
|
| | | }
|
| | | else
|
| | | {
|
| | | btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; |
| | | } |
| | | else |
| | | { |
| | | btnChooseKeyMode.Enable = true; |
| | | btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
|
| | | btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | } |
| | | btnChooseKeyMode.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (targetList.Count == 0)
|
| | | {
|
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindDeviceTargetIsEmpty), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnChooseKeyMode);
|
| | | return;
|
| | | if (targetList.Count == 0) |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindDeviceTargetIsEmpty), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnChooseKeyMode); |
| | | return; |
| | | } |
| | | this.RemoveFromParent(); |
| | | |
| | |
| | | } |
| | | |
| | | var btnRoomFrameLayout = new FrameLayout |
| | | {
|
| | | { |
| | | Height = Application.GetRealHeight(159), |
| | | Width = Application.GetRealWidth(255), |
| | | Y = Application.GetRealHeight(23), |
| | | X = Application.GetRealWidth(5), |
| | | BackgroundImagePath = "Item/RoomIconBackground.png",
|
| | | BorderWidth = 1,
|
| | | BackgroundImagePath = "Item/RoomIconBackground.png", |
| | | BorderWidth = 1, |
| | | }; |
| | | btnHorizontalScrolViewLayout.AddChidren(btnRoomFrameLayout); |
| | | |
| | |
| | | if (curentOldRoomFrameLayout != null) |
| | | { |
| | | curentOldRoomFrameLayout.BorderWidth = 1; |
| | | curentOldRoomFrameLayout.BorderColor = Shared.Common.ZigbeeColor.Current.XMOrange;
|
| | | curentOldRoomFrameLayout.BorderColor = Shared.Common.ZigbeeColor.Current.XMOrange; |
| | | curentOldRoomFrameLayout.BackgroundImagePath = "Item/RoomIconBackground.png"; |
| | | } |
| | | curentOldRoomFrameLayout = btnRoomFrameLayout; |
| | |
| | | int curIndex = 0; |
| | | foreach (var device in curTypeDeviceList) |
| | | { |
| | | curIndex++; |
| | | if (device.CommonDevice != null && device.CommonDevice.IsOnline == 0) |
| | | { |
| | | continue; |
| | |
| | | btnChoose.Visible = true; |
| | | } |
| | | } |
| | | if (targetList.Count == 0)
|
| | | {
|
| | | btnChooseKeyMode.Enable = false;
|
| | | btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
|
| | | }
|
| | | else
|
| | | {
|
| | | btnChooseKeyMode.Enable = true;
|
| | | btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
|
| | | if (targetList.Count == 0) |
| | | { |
| | | btnChooseKeyMode.Enable = false; |
| | | btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; |
| | | } |
| | | else |
| | | { |
| | | btnChooseKeyMode.Enable = true; |
| | | btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | } |
| | | }; |
| | | rowLayout.MouseUpEventHandler += hander; |
| | |
| | | btnChoose.Visible = true; |
| | | } |
| | | } |
| | | |
| | | curIndex++; |
| | | } |
| | | if (targetList.Count == 0)
|
| | | {
|
| | | btnChooseKeyMode.Enable = false;
|
| | | btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
|
| | | }
|
| | | else
|
| | | {
|
| | | btnChooseKeyMode.Enable = true;
|
| | | btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
|
| | | if (targetList.Count == 0) |
| | | { |
| | | btnChooseKeyMode.Enable = false; |
| | | btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; |
| | | } |
| | | else |
| | | { |
| | | btnChooseKeyMode.Enable = true; |
| | | btnChooseKeyMode.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | } |
| | | } |
| | | |