From 613aec6974fccad5e4c07f745b58b3e93d4e8b82 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 06 十一月 2023 16:17:07 +0800
Subject: [PATCH] bug fix

---
 HDL_ON/Entity/Function/Scene.cs                                 |   23 +++++++++++++++--------
 HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs             |    2 +-
 HDL_ON/UI/UI2/3-Intelligence/Scene/SceneTargetTypeChoosePage.cs |    2 +-
 3 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs
index 9065ef5..1e92f33 100644
--- a/HDL_ON/Entity/Function/Scene.cs
+++ b/HDL_ON/Entity/Function/Scene.cs
@@ -87,6 +87,14 @@
         /// 鏄惁鍏佽鍒犻櫎
         /// </summary>
         public bool can_delete = true;
+        /// <summary>
+        /// 鏄惁鍏佽缂栬緫
+        /// </summary>
+        public bool can_edit = true;
+        /// <summary>
+        /// 鏄惁鏄綉鍏虫湰鍦板満鏅�
+        /// </summary>
+        public bool local = false;
 
         /// <summary>
         /// 鍒涘缓璇ュ満鏅殑鐢ㄦ埛ID
@@ -562,25 +570,24 @@
         /// <returns></returns>
         private Function ConvertFunctionObject()
         {
+            Function temp = null;
             if (type == "7")
             {
                 var logic = Logic.LogicList.Find((obj) => obj.sid == sid);
                 if (logic != null) {
-                    _localFunction = new Function()
-                    {
-                        name = logic.name
-                    };
+                    temp = new Function();
+                    temp.name = logic.name;
                 }
             }
             else
             {
-                var localFunction = FunctionList.List.GetDeviceFunctionList().Find((obj) => obj.sid == sid);
-                if (localFunction == null)
+                temp = FunctionList.List.GetDeviceFunctionList().Find((obj) => obj.sid == sid);
+                if (temp == null)
                 {
-                    localFunction = FunctionList.List.groupControls.Find((obj) => obj.sid == sid);
+                    temp = FunctionList.List.groupControls.Find((obj) => obj.sid == sid);
                 }
             }
-            return localFunction;
+            return temp;
         }
 
 
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
index 9bfabf7..40589b1 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
@@ -481,7 +481,6 @@
         void LoadFunctionRow()
         {
             functionListView.RemoveAll();
-            functionListView.Height = Application.GetRealWidth(65 * scene.functions.Count);
             for(int i =0;i<scene.functions.Count;)
             {
                 var scenefunction = scene.functions[i];
@@ -490,6 +489,7 @@
                     scene.functions.Remove(scenefunction);
                     continue;
                 }
+                functionListView.Height = Application.GetRealWidth(65 * scene.functions.Count);
                 try
                 {
                     //灏唖pk瀹炰綋閲岄潰鐨刴in max鍊兼斁鍏ュ満鏅姛鑳藉疄浣撻噷锛岃涓嶇劧鏁版嵁浼氫涪澶� 2022-06-21 16:06:45
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneTargetTypeChoosePage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneTargetTypeChoosePage.cs
index 2bd3b1e..effe348 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneTargetTypeChoosePage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneTargetTypeChoosePage.cs
@@ -39,7 +39,7 @@
                 Height = Application.GetRealHeight(20),
                 BackgroundColor = CSS_Color.BackgroundColor
             });
-            var topView = new TopViewDiv(bodyView,Language.StringByID(StringId.AddExecutionAction);
+            var topView = new TopViewDiv(bodyView,Language.StringByID(StringId.AddExecutionAction));
             topView.maginY = 10;
             topView.LoadTopView();
 

--
Gitblit v1.8.0