示例#1
0
        public void ShutdownAll(List <string> excludeList)
        {
            List <string> list = new List <string>(m_PackageLoading.Keys);

            for (int i = 0; i < list.Count; ++i)
            {
                string name = list[i];
                if (excludeList != null && excludeList.Contains(name))
                {
                    continue;
                }
                if (m_PackageLoading[name] != null)
                {
                    m_PackageLoading[name].Destroy();
                }
                m_PackageLoading.Remove(name);
                m_PendingWindows.Remove(name);
                m_RequestShows.Remove(name);
            }
            m_RollbackStack.Clear();

            for (int index = 0; index < Instance.m_WindowList.Count; ++index)
            {
                string name = Instance.m_WindowList[index].WindowName;
                if (excludeList != null && excludeList.Contains(name))
                {
                    continue;
                }

                if (!Shutdown(name))
                {
                    LOG.Warning("Shutdown '" + name + "' failed.");
                }
            }
        }
示例#2
0
        public void ShutdownGroup(UIWindowGroup group, List <string> excludeList)
        {
            if (excludeList != null)
            {
                for (int i = 0; i < excludeList.Count; ++i)
                {
                    excludeList[i] = excludeList[i];
                }
            }

            UIWindow[] windows = Windows(group);
            for (int index = 0; index < windows.Length; ++index)
            {
                string winName = windows[index].WindowName;
                if (excludeList != null && excludeList.Contains(winName))
                {
                    continue;
                }

                if (!Shutdown(winName))
                {
                    LOG.Warning("Shutdown '" + winName + "' failed.");
                }
            }
        }
示例#3
0
 public void SetFocus(Transform target)
 {
     if (target == null)
     {
         LOG.Warning("[CameraFollow][SetFocus] the focus is null");
         return;
     }
     focus = target;
     BgTransform.position    = _bgInitPostion;
     _thisTransform.position = _cameraInitPostion;
     _prePostionX            = _thisTransform.position.x;
 }
示例#4
0
        //---------------------------------------------------------------------
        private void AddWindow(UIWindow win, UIPackageAsset package)
        {
            if (m_WindowList.Contains(win))
            {
                LOG.Warning(win.GetType().Name +
                            " is the Instance, only one instance.");
                return;
            }

            m_WindowList.Add(win);
            m_WindowPackageMap.Add(win, package);
        }
示例#5
0
        public void Warning()
        {
            using (ILOGInstance instance = new AsyncLOGInstance(true, SyncType.EventWaitHandle, true, new[] { new TestOutputter() }, new[] { new KeyValuePair <string, string>("SessionID", "TestSession") }))
            {
                _testingAdditionalfields.Add("SessionID", "TestSession");

                _testingMessage  = "test warning message";
                _testingTag      = "WARNING";
                _testingSeverity = LogSeverity.Warning;
                instance.Warning(_testingMessage, _testingTag);
                LOG.Warning(_testingMessage, _testingTag);
            }
        }
        //---------------------------------------------------------------------
        private int CorrectDepth(int depth, int minDepth, int maxDepth, bool warning)
        {
            if (warning && (depth < minDepth || depth > maxDepth))
            {
                if (!UIManager.ContainsMutexGroup(windowGroup))
                {
                    LOG.Warning(GetType().Name +
                                " depth must be between " + minDepth.ToString() +
                                " ~ " + maxDepth.ToString() + ". " +
                                "The system will automatically corrected depth.");
                }
            }

            int offset = maxDepth - minDepth + 1;

            return(minDepth + depth % offset);
        }
示例#7
0
        public static void Log(string msg, int eLogType = 3)
        {
            switch ((LogType)eLogType)
            {
            case LogType.Error:
                LOG.Error(msg);
                break;

            case LogType.Assert:
                LOG.KeyLog(msg);
                break;

            case LogType.Warning:
                LOG.Warning(msg);
                break;

            case LogType.Log:
                LOG.Log(msg);
                break;
            }
        }
示例#8
0
 public void StaticWarning()
 {
     Assert.Throws <NotInitializedException>(() => LOG.Warning("WARNING Message"));
 }