From 7c2541f609e8235c4c33b4fb2ee27125f73f8ee6 Mon Sep 17 00:00:00 2001
From: lss <lsc@hdlchina.com.cn>
Date: 星期五, 24 六月 2022 13:28:36 +0800
Subject: [PATCH] 2022-06-24

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

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
index ddeb9d9..ab3db01 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();
         }
@@ -233,6 +234,51 @@
                 Height = Application.GetRealHeight(8),
                 BackgroundColor = CSS_Color.DividingLineColor,
             });
+            #endregion
+
+            #region 缁勫彿
+            //var grounpView = new FrameLayout()
+            //{
+            //    Height = Application.GetRealWidth(50),
+            //};
+            //contentView.AddChidren(grounpView);
+
+            //Button btnGroupTitle = new Button()
+            //{
+            //    X = Application.GetRealWidth(16),
+            //    //Width = Application.GetRealWidth(90),
+            //    TextAlignment = TextAlignment.CenterLeft,
+            //    TextColor = CSS_Color.FirstLevelTitleColor,
+            //    TextSize = CSS_FontSize.TextFontSize,
+            //    Text = "缁勫彿"
+            //};
+            //grounpView.AddChidren(btnGroupTitle);
+
+            //var etGroup = new EditText()
+            //{
+            //    TextAlignment = TextAlignment.CenterRight,
+            //    Width = Application.GetRealWidth(350),
+            //    Text = scene.group,
+            //    TextColor = CSS_Color.PromptingColor1,
+            //    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+            //    IsNumberKeyboardType = true
+            //};
+            //grounpView.AddChidren(etGroup);
+            //etGroup.TextChangeEventHandler = (sender, e) => {
+            //    scene.group = e;
+            //};
+
+
+            //Button btnGroupLine = new Button()
+            //{
+            //    Y = Application.GetRealWidth(49),
+            //    Gravity = Gravity.CenterHorizontal,
+            //    Height = Application.GetRealHeight(1),
+            //    Width = Application.GetRealWidth(343),
+            //    BackgroundColor = CSS_Color.DividingLineColor,
+            //};
+            //grounpView.AddChidren(btnGroupLine);
+
             #endregion
 
             #region 鍦烘櫙寤舵椂row
@@ -391,10 +437,15 @@
                         var tempScene = sceneList.Find((obj) => obj.userSceneId == scene.userSceneId);
                         if (tempScene != null)
                         {
+                            scene.name = tempScene.name;
+                            scene.delay = tempScene.delay;
+                            scene.roomIds = tempScene.roomIds;
                             scene.functions = tempScene.functions;
                         }
                         Application.RunOnMainThread(() =>
                         {
+                            btnSceneName.Text = scene.name;
+                            //etGroup.Text = scene.group;
                             LoadFunctionRow();
                             waitPage.Hide();
                             waitPage.RemoveFromParent();
@@ -513,7 +564,7 @@
 
                 EventHandler<MouseEventArgs> skipEvent = (sender, e) =>
                 {
-                    var ssf = new SceneFunctionInfoEditPage(scene, scenefunction, refreshFunctionRowAction);
+                    var ssf = new SceneFunctionInfoEditPage(scene, scenefunction.localFunction.ConvertSceneFunction(), refreshFunctionRowAction);
                     MainPage.BasePageView.AddChidren(ssf);
                     ssf.LoadPage();
                     MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
@@ -792,6 +843,12 @@
             UploadImage(selectImagePath, addSceneImageView, scene, uploadSuccessAction);
         }
 
+        public override void RemoveFromParent()
+        {
+            backAction();
+            base.RemoveFromParent();
+        }
+
         /// <summary>
         /// 瀹屾垚鎸夐挳鐐瑰嚮浜嬩欢
         /// </summary>
@@ -821,7 +878,7 @@
                     }
                     scene.EditScene();
                     FunctionList.List.scenes.Add(scene);
-                    backAction();
+                    //backAction();
                     this.RemoveFromParent();
                 }
                 if (btnComplete.TextID == StringId.Del)
@@ -829,7 +886,7 @@
                     Action action = () =>
                     {
                         FunctionList.List.DeleteScene(scene,true);
-                        backAction();
+                        //backAction();
                         this.RemoveFromParent();
                     };
                     new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.DeleteSceneTip, action);

--
Gitblit v1.8.0