From 2be70a32d2a8c517bd9868fb60913fcc843e66fe Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 13 五月 2020 11:21:32 +0800
Subject: [PATCH] 上传代码

---
 ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs |   35 ++++++++++++++++++++---------------
 1 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
index 220a7d5..4ff409d 100755
--- a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
+++ b/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();
             //鑾峰彇鎵ц鐩爣鍒楄〃
@@ -821,6 +822,9 @@
             this.editorScene.IconPath = this.cloneScene.IconPath;
             this.editorScene.Save();
 
+            //鏂板缓鍦烘櫙,涓婚〉闇�瑕侀噸鏂板埛鏂�
+            UserView.UserPage.Instance.RefreshForm = true;
+
             HdlThreadLogic.Current.RunMain(() =>
             {
                 //璋冪敤鍥炶皟鍑芥暟
@@ -888,6 +892,9 @@
             this.editorScene.IconPath = this.cloneScene.IconPath;
             this.editorScene.Save();
 
+            //缂栬緫鍦烘櫙,涓婚〉闇�瑕侀噸鏂板埛鏂�
+            UserView.UserPage.Instance.RefreshForm = true;
+
             HdlThreadLogic.Current.RunMain(() =>
             {
                 //璋冪敤鍥炶皟鍑芥暟
@@ -942,11 +949,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)
                     {

--
Gitblit v1.8.0