From a9d1161b1df96e7ddad566335989a1444e433ef5 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 28 三月 2023 11:54:45 +0800
Subject: [PATCH] 2023年03月28日11:52:02

---
 HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs |   30 +++++++++++++++++++++++++-----
 1 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
index c660e9e..1a39122 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
@@ -98,6 +98,7 @@
 
         public void LoadPage(Action backRefresh)
         {
+             //DB_ResidenceData.Instance.sceneChooseRoomId
             new TopViewDiv(bodyView, Language.StringByID(StringId.EditScene)).LoadTopView(backRefresh);
             initPage();
         }
@@ -436,7 +437,10 @@
                         var tempScene = sceneList.Find((obj) => obj.userSceneId == scene.userSceneId);
                         if (tempScene != null)
                         {
-                            scene = tempScene;
+                            scene.name = tempScene.name;
+                            scene.delay = tempScene.delay;
+                            scene.roomIds = tempScene.roomIds;
+                            scene.functions = tempScene.functions;
                         }
                         Application.RunOnMainThread(() =>
                         {
@@ -478,6 +482,13 @@
                     scene.functions.Remove(scenefunction);
                     continue;
                 }
+                //灏唖pk瀹炰綋閲岄潰鐨刴in max鍊兼斁鍏ュ満鏅姛鑳藉疄浣撻噷锛岃涓嶇劧鏁版嵁浼氫涪澶� 2022-06-21 16:06:45
+                foreach (var tt in scenefunction.status) {
+                    tt.min = scenefunction.localFunction.GetAttribute(tt.key).min;
+                    tt.max = scenefunction.localFunction.GetAttribute(tt.key).max;
+                    tt.valueList = scenefunction.localFunction.GetAttribute(tt.key).value;
+                }
+
                 i++;
                 var row = new RowLayout()
                 {
@@ -560,14 +571,17 @@
 
                 EventHandler<MouseEventArgs> skipEvent = (sender, e) =>
                 {
-                    var ssf = new SceneFunctionInfoEditPage(scene, scenefunction.localFunction.ConvertSceneFunction(), refreshFunctionRowAction);
+                    var ssf = new SceneFunctionInfoEditPage(scene, scenefunction, refreshFunctionRowAction);
                     MainPage.BasePageView.AddChidren(ssf);
                     ssf.LoadPage();
                     MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                 };
                 btnFunctionName.MouseUpEventHandler = skipEvent;
                 btnFunctionFloorAndRoom.MouseUpEventHandler = skipEvent;
-
+                btnFunctionDelayInfo.MouseUpEventHandler = skipEvent;
+                btnFunctionInfo.MouseUpEventHandler = skipEvent;
+                btnRight.MouseUpEventHandler = skipEvent;
+                row.MouseUpEventHandler = skipEvent;
 
                 Button btnDelSceneFunction = new Button() {
                     BackgroundColor = CSS_Color.WarningColor,
@@ -839,6 +853,12 @@
             UploadImage(selectImagePath, addSceneImageView, scene, uploadSuccessAction);
         }
 
+        public override void RemoveFromParent()
+        {
+            backAction();
+            base.RemoveFromParent();
+        }
+
         /// <summary>
         /// 瀹屾垚鎸夐挳鐐瑰嚮浜嬩欢
         /// </summary>
@@ -868,7 +888,7 @@
                     }
                     scene.EditScene();
                     FunctionList.List.scenes.Add(scene);
-                    backAction();
+                    //backAction();
                     this.RemoveFromParent();
                 }
                 if (btnComplete.TextID == StringId.Del)
@@ -876,7 +896,7 @@
                     Action action = () =>
                     {
                         FunctionList.List.DeleteScene(scene,true);
-                        backAction();
+                        //backAction();
                         this.RemoveFromParent();
                     };
                     new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.DeleteSceneTip, action);

--
Gitblit v1.8.0