| | |
| | | namespace HDL_ON.Entity |
| | | { |
| | | |
| | | public class SecurityCenter |
| | | public class SecurityCenter111111 |
| | | { |
| | | static SecurityCenter _securityCenter; |
| | | static SecurityCenter111111 _securityCenter; |
| | | |
| | | public static SecurityCenter Ins |
| | | public static SecurityCenter111111 Ins |
| | | { |
| | | get |
| | | { |
| | | if (_securityCenter == null) |
| | | { |
| | | _securityCenter = new SecurityCenter(); |
| | | _securityCenter = new SecurityCenter111111(); |
| | | } |
| | | return _securityCenter; |
| | | } |
| | |
| | | { |
| | | get |
| | | { |
| | | foreach (var temp in FunctionList.List.securities) |
| | | lock (FunctionList.List.securities) |
| | | { |
| | | if (temp.status == "enable") |
| | | { |
| | | return true; |
| | | } |
| | | var temp = FunctionList.List.securities.Find((obj) => obj.status == "enable"); |
| | | return temp == null ? false : true; |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | get |
| | | { |
| | | foreach (var temp in FunctionList.List.securities) |
| | | lock (FunctionList.List.securities) |
| | | { |
| | | if (temp.alarm) |
| | | { |
| | | return true; |
| | | } |
| | | var temp = FunctionList.List.securities.Find((obj) => obj.alarm == true); |
| | | return temp == null ? false : true; |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (_inDefenseMode == null) |
| | | { |
| | | foreach (var temp in FunctionList.List.securities) |
| | | lock (FunctionList.List.securities) |
| | | { |
| | | if (temp.status == "enable") |
| | | { |
| | | _inDefenseMode = temp; |
| | | return _inDefenseMode; |
| | | } |
| | | var temp = FunctionList.List.securities.Find((obj) => obj.status == "enable"); |
| | | return temp; |
| | | } |
| | | } |
| | | return _inDefenseMode; |