wei
2021-08-27 1f5fdd892e8efc9f1babe1ace9d810803edef396
HDL_ON/Entity/Function/SecurityAlarm.cs
@@ -7,17 +7,17 @@
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;
            }
@@ -30,14 +30,11 @@
        {
            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;
            }
        }
@@ -48,14 +45,11 @@
        {
            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;
            }
        }
@@ -69,13 +63,10 @@
            {
                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;