HDL Home App 第二版本 旧平台金堂用 正在使用
xm
2019-12-20 3291885285dfd5d4f665c20676307878dc3163bc
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddDevicePage.cs
@@ -81,7 +81,6 @@
            var btnAddFrameLayout = new FrameLayout
            {
                X = Application.GetRealWidth(830),
                Width = Application.GetRealWidth(200),
            };
            this.titleFrameLayout.AddChidren(btnAddFrameLayout);
@@ -107,14 +106,22 @@
            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);
        }
@@ -182,17 +189,17 @@
                        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();
@@ -240,23 +247,23 @@
            {
                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();
@@ -309,13 +316,13 @@
                }
                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);
@@ -357,7 +364,7 @@
                        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;
@@ -532,6 +539,7 @@
            int curIndex = 0;
            foreach (var device in curTypeDeviceList)
            {
                curIndex++;
                if (device.CommonDevice != null && device.CommonDevice.IsOnline == 0)
                {
                    continue;
@@ -618,15 +626,15 @@
                            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;
@@ -651,18 +659,16 @@
                        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;
            }
        }