| | |
| | | /// </summary> |
| | | /// <param name="common">Common.</param> |
| | | /// <param name="actionsInfo">Objecttype.</param> |
| | | public static void AddDeviceactions(ZigBee.Device.CommonDevice common, Dictionary<string, object> actionsInfo) |
| | | public static void AddDeviceActions(ZigBee.Device.CommonDevice common, Dictionary<string, object> actionsInfo) |
| | | { |
| | | for (int i = 0; i < Common.Logic.CurrentLogic.Actions.Count; i++) |
| | | { |
| | |
| | | Common.Logic.CurrentLogic.Actions.Add(actionsInfo); |
| | | } |
| | | /// <summary> |
| | | /// 添加门锁设备输出的方法 |
| | | /// </summary> |
| | | /// <param name="common">Common.</param> |
| | | /// <param name="actionsInfo">Objecttype.</param> |
| | | public static void AddDoorLockActions(ZigBee.Device.CommonDevice common, Dictionary<string, object> actionsInfo) |
| | | { |
| | | for (int i = 0; i < Common.Logic.CurrentLogic.Actions.Count; i++) |
| | | { |
| | | if (Common.Logic.CurrentLogic.Actions[i]["LinkType"].ToString() == "8") |
| | | { |
| | | if (Common.Logic.CurrentLogic.Actions[i]["DeviceAddr"].ToString() == common.DeviceAddr && Common.Logic.CurrentLogic.Actions[i]["Epoint"].ToString() == common.DeviceEpoint.ToString()) |
| | | { |
| | | Common.Logic.CurrentLogic.Actions.RemoveAt(i); |
| | | Common.Logic.CurrentLogic.Actions.Insert(i, actionsInfo); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | Common.Logic.CurrentLogic.Actions.Add(actionsInfo); |
| | | } |
| | | /// <summary> |
| | | /// 添加Scene输出的方法 |
| | | /// </summary> |
| | | /// <param name="Scene">Common.</param> |