黄学彪
2020-03-06 a5b3c4bae726ef6770d4bfcbf2f4b50a37ed4a15
ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
@@ -39,7 +39,7 @@
            var titleName = new Button
            {
                TextSize = 16,
                TextSize = 17,
                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                TextAlignment = TextAlignment.CenterLeft,
                X = Application.GetRealWidth(160),
@@ -47,6 +47,7 @@
                Height = Application.GetRealHeight(69),
                Y = Application.GetRealHeight(92),
                TextID = MyInternationalizationString.addscene,
                IsBold = true,
            };
            topRowLayout.AddChidren(titleName);
@@ -88,6 +89,7 @@
                Y = Application.GetRealHeight(92),
                //TextID = MyInternationalizationString.customroom,
                Text = Config.Instance.Home.GetCurrentFloorName,
                TextSize = 14,
            };
            topRowLayout.AddChidren(foolrname);
            var dropdown = new Button
@@ -100,11 +102,12 @@
                Y = Application.GetRealHeight(92),
                UnSelectedImagePath = "ZigeeLogic/drop-down.png",
            };
            topRowLayout.AddChidren(dropdown);
            topRowLayout.AddChidren(dropdown);
            #endregion
            ///没有房间直接返回去;
            if (Common.Room.Lists.Count == 0)
            var listAllRoom = UserCenter.HdlRoomLogic.Current.GetAllListRooms();
            if (listAllRoom.Count == 0)
            {
                return;
            }
@@ -134,7 +137,7 @@
            };
            this.AddChidren(saveframeLayout);
          var  btnsave = new Button
            var btnsave = new Button
            {
                X = Application.GetRealWidth(85),
                Height = Application.GetRealHeight(130),
@@ -143,6 +146,7 @@
                BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
                TextID = MyInternationalizationString.Save,
                TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
                TextSize = 16,
            };
            saveframeLayout.AddChidren(btnsave);
@@ -150,9 +154,9 @@
            {
                if (clickTag == "no" || tempScene == null)
                {
                    var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
                                              Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
                                              Language.StringByID(MyInternationalizationString.complete));
                    var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal,
                          Language.StringByID(MyInternationalizationString.scenetip),
                          Language.StringByID(MyInternationalizationString.confrim));
                    alert.Show();
                    return;
                }
@@ -200,6 +204,7 @@
                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                    X = Application.GetRealWidth(80),
                    TextID = MyInternationalizationString.selecfoolr,
                    TextSize = 14,
                };
                foolrbjicon.AddChidren(btnfoolrtext);
@@ -241,6 +246,7 @@
                        TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
                        Tag = foolr.Key,
                        X = btnfoolricon.Right + Application.GetRealWidth(12),
                        TextSize = 14,
                    };
                    foolrRowLayout.AddChidren(btnfoolrname);
                    if (foolrname.Text == foolr.Value)
@@ -278,7 +284,7 @@
                dropdown.Visible = false;
                if (Config.Instance.Home.FloorDics.Count == 0)
                {
                    roomlists.AddRange(Common.Room.Lists);
                    roomlists.AddRange(listAllRoom);
                }
                else
                {
@@ -344,7 +350,7 @@
                    roomTextButton.IsSelected = false;
                    roomTextButton = roomnameBtn;
                    roomnameBtn.IsSelected = true;
                    SceneView(room.SceneUIList);
                    SceneView(room.ListSceneId);
                }
@@ -362,7 +368,7 @@
                    roomTextButton.IsSelected = false;
                    roomTextButton = roomnameBtn;
                    roomnameBtn.IsSelected = true;
                    SceneView(room.SceneUIList);
                    SceneView(room.ListSceneId);
                };
                roomnameBtn.MouseUpEventHandler += roomclick;
                roombjBtn.MouseUpEventHandler += roomclick;
@@ -373,11 +379,16 @@
        /// 显示所有的场景的方法
        /// </summary>
        /// <param name="scenelist"></param>
        void SceneView(List<SceneUI>scenelist)
        void SceneView(List<int>scenelist)
        {
            middle.RemoveAll();
            foreach (var scene in scenelist)
            foreach (var sceneId in scenelist)
            {
                var scene = UserCenter.HdlSceneLogic.Current.GetSceneUIBySceneId(sceneId);
                if (scene == null)
                {
                    continue;
                }
                var sceneFramelayout = new FrameLayout
                {
                    Height = Application.GetRealHeight(160),
@@ -414,6 +425,7 @@
                    TextAlignment = TextAlignment.CenterLeft,
                    TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                    SelectedTextColor = ZigbeeColor.Current.LogicAddColor,
                    TextSize = 14,
                };
                sceneRow.AddChidren(scenename);