| | |
| | | using HDL_ON.Common; |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.UI; |
| | | using HDL_ON.UI.UI2.Intelligence.Automation; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.Entity |
| | |
| | | /// 是否允许删除 |
| | | /// </summary> |
| | | public bool can_delete = true; |
| | | /// <summary> |
| | | /// 是否允许编辑 |
| | | /// </summary> |
| | | public bool can_edit = true; |
| | | /// <summary> |
| | | /// 是否是网关本地场景 |
| | | /// </summary> |
| | | public bool local = false; |
| | | |
| | | /// <summary> |
| | | /// 创建该场景的用户ID |
| | |
| | | /// <returns></returns> |
| | | private Function ConvertFunctionObject() |
| | | { |
| | | var localFunction = FunctionList.List.GetDeviceFunctionList().Find((obj) => obj.sid == sid); |
| | | if(localFunction == null) |
| | | Function temp = null; |
| | | if (type == "7") |
| | | { |
| | | localFunction = FunctionList.List.groupControls.Find((obj) => obj.sid == sid); |
| | | var logic = Logic.LogicList.Find((obj) => obj.sid == sid); |
| | | if (logic != null) { |
| | | temp = new Function(); |
| | | temp.name = logic.name; |
| | | } |
| | | return localFunction; |
| | | } |
| | | else |
| | | { |
| | | temp = FunctionList.List.GetDeviceFunctionList().Find((obj) => obj.sid == sid); |
| | | if (temp == null) |
| | | { |
| | | temp = FunctionList.List.groupControls.Find((obj) => obj.sid == sid); |
| | | } |
| | | } |
| | | return temp; |
| | | } |
| | | |
| | | |
| | |
| | | public string GetFunctionScnenInfo() |
| | | { |
| | | var sceneFunctionInfo = ""; |
| | | if (type == "7") |
| | | { |
| | | foreach (var sfs in status) |
| | | { |
| | | if (sfs.key == "enable") |
| | | { |
| | | if (sfs.value == "true") |
| | | return Language.StringByID(StringId.OpenArm); |
| | | else |
| | | { |
| | | return Language.StringByID(StringId.Close); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | foreach (var sfs in status) |
| | | { |
| | | if (sfs.key == FunctionAttributeKey.OnOff) |
| | |
| | | { |
| | | sceneFunctionInfo += " " + perSongName.value; |
| | | } |
| | | } |
| | | return sceneFunctionInfo; |
| | | } |
| | | |
| | |
| | | /// 设备 |
| | | /// 场景 =scene |
| | | /// 群控=5 |
| | | /// 自动化=7 |
| | | /// |
| | | /// </summary> |
| | | public string type = "0"; |
| | | } |