示例#1
0
        protected void InternalSystemCheck()
        {
            try
            {
                if (communicationSystems != null)
                {
                    UpdateInfoKey("communicationSystems", BoolToOnOff(communicationSystems.IsOperational()) + "");
                }
                if (trackingSystems != null)
                {
                    UpdateInfoKey("trackingSystems", BoolToOnOff(trackingSystems.IsOperational()) + "");
                }
                if (weaponSystems != null)
                {
                    UpdateInfoKey("weaponSystems", BoolToOnOff(weaponSystems.IsOperational()) + "");
                }

                CalculatePower();
            }
            catch (Exception e) { log.Error("InternalSystemScan " + e.StackTrace); }
        }
示例#2
0
        protected void InternalSystemScan()
        {
            try
            {
                var cs = communicationSystems.IsOperational();
                var ns = navigationSystems.IsOperational();
                var ps = productionSystems.IsOperational();
                var ss = storageSystem.IsOperational();
                var ts = trackingSystems.IsOperational();
                var ws = weaponSystems.IsOperational();

                UpdateInfoKey("WeaponSystems", BoolToOnOff(ws) + "");
                UpdateInfoKey("CommunicationSystems", BoolToOnOff(cs) + "");
                UpdateInfoKey("NavigationSystems", BoolToOnOff(ns) + "");
                UpdateInfoKey("TrackingSystems", BoolToOnOff(ts) + "");
                UpdateInfoKey("ProductionSystems", BoolToOnOff(ps) + "");
                UpdateInfoKey("StorageSystem", BoolToOnOff(ss) + "");

                navigationSystems.Update();
            }
            catch (Exception e) { log.Error("InternalSystemScan " + e.Message); }
        }