wxr
2024-10-23 47f179be722a61c95cc03c8f90e1aa91c12d1124
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
@@ -404,14 +412,24 @@
                {
                    result = ApiUtlis.Ins.HttpRequest.CancelCollectScene(userSceneId);
                }
                //提示错误
                if (result != StateCode.SUCCESS)
                {
                    Application.RunOnMainThread(() =>
                    if (!Common.ApiUtlis.Ins.hadInternet)
                    {
                        collect = !collect;
                        IMessageCommon.Current.ShowErrorInfoAlter(result);
                    });
                        this.SaveSceneFile();
                    }
                    else
                    {
                        Application.RunOnMainThread(() =>
                        {
                            collect = !collect;
                            IMessageCommon.Current.ShowErrorInfoAlter(result);
                        });
                    }
                }
                else
                {
                    this.SaveSceneFile();
                }
            })
            { IsBackground = true }.Start();
@@ -562,25 +580,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;
        }
@@ -722,6 +739,7 @@
        /// <summary>
        /// 属性的值列表
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public List<string> valueList = new List<string>();
        /// <summary>
        /// 属性名称显示文本
@@ -787,6 +805,7 @@
            return text;
        }
        [Newtonsoft.Json.JsonIgnore]
        public string UintString = "";
        /// <summary>