gxc
2019-12-13 eb424d24e39bab4a245725f35deab3f234ea0f13
ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
@@ -36,7 +36,7 @@
        /// </summary>
        private string ImagePath="SceneIcon/1.png";
        /// <summary>
        /// 图片来源 0--本地图库 1--拍照 2--系统图库
        /// 图片来源 0--本地图库 1--拍照 2--系统图库
        /// </summary>
        public int IconPathType = 0;
        /// <summary>
@@ -159,7 +159,7 @@
                        targetRow.SetNameText(devNameText);
                        targetRow.SetZoneText(targetDevice.SceneUI.GetZone());
                    }
                    var editBtn = new Button()
                    {
                        BackgroundColor = ZigbeeColor.Current.GXCEditBackGroundColor,
@@ -250,8 +250,17 @@
                            };
                        }
                    }
                }
                if (sceneTargetDevicesList.Count > 2)
                {
                    var targetRowLayout = new RowLayout()
                    {
                        Height = Application.GetRealHeight(300),
                        LineColor = ZigbeeColor.Current.GXCBackgroundColor,
                        BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
                    };
                    TargetListScrolView.AddChidren(targetRowLayout);
                }
            }
        }
@@ -275,7 +284,7 @@
        /// </summary>
        private void Init()
        {
        }
        /// <summary>
@@ -567,10 +576,10 @@
                        backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath);
                        backGround.ImagePath = imagePath;
                        System.IO.File.Delete(imagePath);
                    }, fileName, 2, 1);
                };
                selectAblumsBtn.MouseUpEventHandler += (send, ee) =>
                {
                    selectFL.RemoveFromParent();
@@ -631,7 +640,7 @@
                    {
                        curRoom = rooms[index1][index2];
                        zoneRow.SetTitle($"{Config.Instance.Home.GetFloorNameById(floorIds[index1])} , {rooms[index1][index2].Name}");
                    }, 0, 0, Language.StringByID(R.MyInternationalizationString.BelongFloor),
                    }, 0, 0, Language.StringByID(R.MyInternationalizationString.BelongZone),
                   Language.StringByID(R.MyInternationalizationString.Confrim),
                   Language.StringByID(R.MyInternationalizationString.Cancel));
                }
@@ -651,7 +660,7 @@
                    {
                        curRoom = rs[index1];
                        zoneRow.SetTitle(rs[index1].Name);
                    }, 0, Language.StringByID(R.MyInternationalizationString.BelongFloor),
                    }, 0, Language.StringByID(R.MyInternationalizationString.BelongZone),
                   Language.StringByID(R.MyInternationalizationString.Confrim),
                   Language.StringByID(R.MyInternationalizationString.Cancel));
                }
@@ -662,15 +671,18 @@
            EventHandler<MouseEventArgs> targetAddHander = (sender, e) =>
            {
                if (curRoom == null)
                //if (curRoom == null)
                //{
                //    RoomCommon.ShowTipNoRoom();
                //    return;
                //}
                if(curRoom != null)
                {
                    RoomCommon.ShowTipNoRoom();
                    return;
                }
                if (curRoom.IsSharedRoom)
                {
                    RoomCommon.ShowTipRoomIsShared();
                    return;
                    if (curRoom.IsSharedRoom)
                    {
                        RoomCommon.ShowTipRoomIsShared();
                        return;
                    }
                }
                int selectRow_Height = 150;
@@ -776,7 +788,7 @@
                        sceneTargetDevicesList.Add(selectedScene);
                        RefreshTargetListView();
                    };
                };
                //添加时间间隔
                selectedTimerBtn.MouseUpEventHandler += (send, ee) =>
@@ -841,7 +853,7 @@
                            {
                                if (Common.Room.CurrentRoom.GetSameFloorScenes(curRoom.FloorId).Find(s => s.Name == nameRow.NameText.Text.Trim()) != null)
                                {
                                    Common.CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist);
                                    CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneHadExist));
                                    return;
                                }
                                var r = await ZigBee.Device.Scene.RenameSceneAsync(modifySceneUI.Id, nameRow.NameText.Text.Trim());
@@ -972,7 +984,6 @@
                            {
                                if (modifyRoom != curRoom)
                                {
                                    modifyRoom.SceneUIList.Remove(modifySceneUI);
                                    modifyRoom.SceneUIFilePathList.Remove(modifySceneUI.FileName);
                                    curRoom.SceneUIList.Add(modifySceneUI);
@@ -1109,7 +1120,6 @@
                    }
                }
            };
            #endregion
        }