| | |
| | | |
| | | namespace HDL_ON.Entity |
| | | { |
| | | |
| | | public class SecurityCenter |
| | | { |
| | | static SecurityCenter _securityCenter; |
| | | |
| | | public static SecurityCenter Ins |
| | | { |
| | | get |
| | | { |
| | | if (_securityCenter == null) |
| | | { |
| | | _securityCenter = new SecurityCenter(); |
| | | } |
| | | return _securityCenter; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 布防中 |
| | | /// </summary> |
| | | public bool InDefense |
| | | { |
| | | get |
| | | { |
| | | foreach (var temp in FunctionList.List.securities) |
| | | { |
| | | if (temp.status == "enable") |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 报警中 |
| | | /// </summary> |
| | | public bool InAlarm |
| | | { |
| | | get |
| | | { |
| | | foreach (var temp in FunctionList.List.securities) |
| | | { |
| | | if (temp.alarm) |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | SecurityAlarm _inDefenseMode; |
| | | /// <summary> |
| | | /// 当前布防模式 |
| | | /// </summary> |
| | | public SecurityAlarm InDefenseMode |
| | | { |
| | | get |
| | | { |
| | | if (_inDefenseMode == null) |
| | | { |
| | | foreach (var temp in FunctionList.List.securities) |
| | | { |
| | | if (temp.status == "enable") |
| | | { |
| | | _inDefenseMode = temp; |
| | | return _inDefenseMode; |
| | | } |
| | | } |
| | | } |
| | | return _inDefenseMode; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | public class SecurityAlarm |
| | | { |
| | | public SecurityAlarm() |
| | |
| | | /// 撒防:disable |
| | | /// </summary> |
| | | public string status = "disable"; |
| | | /// <summary> |
| | | /// 报警状态 |
| | | /// </summary> |
| | | public bool alarm = false; |
| | | /// <summary> |
| | | /// 类型 |
| | | /// "all"--全宅布防, |
| | |
| | | { |
| | | public string sid; |
| | | public string status ="disable" ; |
| | | public string alarm ="false"; |
| | | public bool alarm = false; |
| | | } |
| | | } |