xm
2020-05-18 cf0bffdf072bae11bdb8c780d0a355818700f713
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
@@ -151,7 +151,6 @@
            btnHorizontalScrolViewLayout = new HorizontalScrolViewLayout
            {
                X = Application.GetRealWidth(58),
                BackgroundColor = 0xff00ff00,
            };
            btnMidTopLayout.AddChidren(btnHorizontalScrolViewLayout);
@@ -491,11 +490,11 @@
                {
                    roomTempList.Add(room);
                }
                if (roomTempList.Count != 0)
                {
                    curRoom = roomTempList[0];
                }
            }
            for (int i = 0; i < roomTempList.Count; i++)
            {
                var room = roomTempList[i];
                curRoom = roomTempList[0];
                var btnRoomFrameLayout = new FrameLayout
                {
                    Height = Application.GetMinReal(159),
@@ -528,6 +527,20 @@
                    curentOldRoom = btnRoom;
                    curentOldRoomFrameLayout = btnRoomFrameLayout;
                }
                if (index == roomTempList.Count - 1 && index > 3)
                {
                    var btnRoomFrameLayoutEmpty = new FrameLayout
                    {
                        Height = Application.GetMinReal(159),
                        Width = Application.GetMinReal(50),
                        Y = Application.GetRealHeight(23),
                        X = Application.GetRealWidth(5),
                        BorderWidth = 1,
                    };
                    btnHorizontalScrolViewLayout.AddChidren(btnRoomFrameLayoutEmpty);
                }
                EventHandler<MouseEventArgs> eHandlerRoom = (sender, e) =>
                {
                    if (!btnRoom.IsSelected)
@@ -695,48 +708,42 @@
                    }
                }
                bool IsTip = false;
                EventHandler<MouseEventArgs> hander = (sender, e) =>
                {
                    if (currentKey.bindList.Count != 0)
                    {
                        if (IsTip)
                        {
                            return;
                        }
                        IsTip = true;
                        if (btnChoose.IsSelected)
                        {
                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindExist), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnBindName);
                            return;
                        }
                    }
               {
                   if (currentKey.bindList.Count != 0)
                   {
                       if (btnChoose.IsSelected)
                       {
                           new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindExist), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnBindName);
                           return;
                       }
                   }
                    if (!btnChoose.IsSelected)
                    {
                        if (oldScene != null)
                        {
                            oldScene.IsSelected = false;
                            oldScene.Visible = false;
                        }
                        oldScene = btnChoose;
                        oldScene.IsSelected = true;
                        oldScene.Visible = true;
                        targetListDevice.Clear();
                        targetListScene.Clear();
                        targetListScene.Add(scene);
                    }
                    if (targetListDevice.Count == 0 && targetListScene.Count == 0)
                    {
                        btnFinifh.Enable = false;
                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
                    }
                    else
                    {
                        btnFinifh.Enable = true;
                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                    }
                };
                   if (!btnChoose.IsSelected)
                   {
                       if (oldScene != null)
                       {
                           oldScene.IsSelected = false;
                           oldScene.Visible = false;
                       }
                       oldScene = btnChoose;
                       oldScene.IsSelected = true;
                       oldScene.Visible = true;
                       targetListDevice.Clear();
                       targetListScene.Clear();
                       targetListScene.Add(scene);
                   }
                   if (targetListDevice.Count == 0 && targetListScene.Count == 0)
                   {
                       btnFinifh.Enable = false;
                       btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
                   }
                   else
                   {
                       btnFinifh.Enable = true;
                       btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                   }
               };
                rowLayout.MouseUpEventHandler += hander;
                devicePic.MouseUpEventHandler += hander;
                btnBindName.MouseUpEventHandler += hander;