lss
2020-06-12 9c16d3614d9b88c637f967518a329f239fcd3aaf
ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
@@ -159,8 +159,8 @@
            //场景图片
            this.btnScenePic = new ImageView();
            btnScenePic.Y = Application.GetRealHeight(46);
            btnScenePic.Width = Application.GetMinRealAverage(887);
            btnScenePic.Height = Application.GetMinRealAverage(444);
            btnScenePic.Width = this.GetPictrueRealSize(887);
            btnScenePic.Height = this.GetPictrueRealSize(444);
            btnScenePic.Radius = (uint)Application.GetRealHeight(17);
            btnScenePic.Gravity = Gravity.CenterHorizontal;
            if (this.editorScene == null)
@@ -182,7 +182,8 @@
            btnZhezhao.Height = btnScenePic.Height;
            btnZhezhao.Y = btnScenePic.Y;
            btnZhezhao.Gravity = Gravity.CenterHorizontal;
            btnZhezhao.Radius = btnScenePic.Radius;
            btnZhezhao.Radius = (uint)Application.GetRealHeight(17);
            btnZhezhao.BackgroundColor = UserCenterColor.Current.PictrueZhezhaoColor;
            framePicBack.AddChidren(btnZhezhao);
            //分享的场景不能编辑
@@ -258,7 +259,7 @@
        /// </summary>
        private void InitAddTargetControl()
        {
            if (this.frameTargetTableControl == null)
            if (this.frameTargetTableControl == null || this.frameTargetTableControl.Parent == null)
            {
                //添加目标的的容器控件
                this.frameTargetTableControl = new FrameListControl();
@@ -294,8 +295,11 @@
            {
                //从网关获取场景的执行目标
                var result = await this.GetSceneTargetList();
                //添加【执行目标行】
                this.AddTargetRow();
                if (result == true)
                {
                    //添加【执行目标行】
                    this.AddTargetRow();
                }
            });
        }
@@ -399,8 +403,6 @@
                var btnEditor = rowDevice.AddEditorControl();
                btnEditor.ButtonClickEvent += (sender, e) =>
                {
                    //隐藏右滑菜单
                    rowDevice.HideMenu();
                    if (device.Type == DeviceType.DimmableLight//调光器
                      || device.Type == DeviceType.ColorDimmableLight)//彩灯
                    {
@@ -590,8 +592,6 @@
                var btnEditor = rowDelay.AddEditorControl();
                btnEditor.ButtonClickEvent += (sender, e) =>
                {
                    //隐藏右滑菜单
                    rowDelay.HideMenu();
                    //延时时间选择
                    var form = new AdjustTargetAddDelayTimeForm();
                    form.AddForm(data.DelayTime);
@@ -639,6 +639,7 @@
            {
                return true;
            }
            //打开进度条
            this.ShowProgressBar();
            //获取执行目标列表
@@ -675,7 +676,7 @@
            //那个特殊的控件
            this.frameBottomTemp = new FrameLayout();
            frameBottomTemp.Height = bodyFrameLayout.Height - btnTemp.Yaxis + Application.GetRealHeight(23);
            this.listBodyControl.AddChidrenFrame(frameBottomTemp);
            this.listBodyControl.AddChidren(frameBottomTemp);
        }
        #endregion
@@ -821,6 +822,9 @@
            this.editorScene.IconPath = this.cloneScene.IconPath;
            this.editorScene.Save();
            //新建场景,主页需要重新刷新
            UserView.UserPage.Instance.RefreshForm = true;
            HdlThreadLogic.Current.RunMain(() =>
            {
                //调用回调函数
@@ -860,6 +864,15 @@
                //变更房间
                HdlSceneLogic.Current.ChangedSceneRoom(this.editorScene, this.nowRoomId);
            }
            else
            {
                //移除出房间
                var room = HdlRoomLogic.Current.GetRoomBySceneId(this.editorScene.Id);
                if (room != null)
                {
                    HdlSceneLogic.Current.DeleteSceneFromRoom(room, this.editorScene);
                }
            }
            //图片改变了
            if (isScenePictrueChanged == true)
@@ -887,6 +900,9 @@
            this.editorScene.IconPathType = this.cloneScene.IconPathType;
            this.editorScene.IconPath = this.cloneScene.IconPath;
            this.editorScene.Save();
            //编辑场景,主页需要重新刷新
            UserView.UserPage.Instance.RefreshForm = true;
            HdlThreadLogic.Current.RunMain(() =>
            {
@@ -942,11 +958,9 @@
            //默认图库
            menuContr.AddMenu(Language.StringByID(R.MyInternationalizationString.LocalPicture), () =>
            {
                var localPic = new Device.Room.AddRoomSelectPicByLocal();
                UserView.HomePage.Instance.AddChidren(localPic);
                UserView.HomePage.Instance.PageIndex += 1;
                localPic.Show();
                localPic.action = (imgPath) =>
                var form = new SelectLocalSceneImageForm();
                form.AddForm();
                form.FinishSelectEvent = (imgPath) =>
                {
                    if (string.IsNullOrEmpty(imgPath) == true)
                    {