Beispiel #1
0
        /// <summary>
        /// 初始化“UI窗体预设”路径数据
        /// </summary>
        private void InitUIFormsPathData()
        {
            IConfigManager configMgr = new ConfigManagerByJson("Configs/" + SysDefine.SYS_PATH_UIFORMS_CONFIG_INFO);

            if (configMgr != null)
            {
                _DicFormsPaths = configMgr.AppSetting;
            }
        }
Beispiel #2
0
        /// <summary>
        /// 初始化语言缓存集合
        /// </summary>
        private void InitLauguageCache()
        {
            IConfigManager config = new ConfigManagerByJson("LauguageJSONConfig");

            if (config != null)
            {
                _DicLauguageCache = config.AppSetting;
            }
        }
Beispiel #3
0
        /// <summary>
        /// 初始化语言缓存集合
        /// </summary>
        private void InitLauguageCache()
        {
            IConfigManager config = new ConfigManagerByJson(SysDefine.SYS_PATH_CNLauguageJson);

            if (config != null)
            {
                _DicLauguageTraCache = config.AppSetting;
            }
        }
Beispiel #4
0
        /// <summary>
        /// 初始化“UI窗体预设”路径数据
        /// </summary>
        private void InitUIFormsPathsData()
        {
            //测试也成功
            IConfigManager configMgr = new ConfigManagerByJson(SysDefine.SYS_PATH_UIFormConfigJson);

            if (_DicUIFormsPaths != null)
            {
                _DicUIFormsPaths = configMgr.AppSetting;
            }
        }
Beispiel #5
0
        /// <summary>
        /// 初始化语言缓存集合
        /// </summary>
        private void InitLauguageCache()
        {
            //json 再SA目录中路径信息
            string strJsonDeployPath = string.Empty;

            strJsonDeployPath = ABFW.PathTools.GetABOutPath() + HotUpdateProcess.HotUpdatePathTool.JSON_DEPLOY_PATH;
            strJsonDeployPath = strJsonDeployPath + "/" + SysDefine.SYS_PATH_LAUGUAGE_JSON_CONFIG;

            IConfigManager config = new ConfigManagerByJson(strJsonDeployPath);

            //IConfigManager config = new ConfigManagerByJson(strJsonDeployPath);
            if (config != null)
            {
                _DicLauguageCache = config.AppSetting;
            }
        }
Beispiel #6
0
        /// <summary>
        /// 初始化“UI窗体预设”路径数据
        /// </summary>
        private void InitUIFormsPathData()
        {
            //json 再SA目录中路径信息
            string strJsonDeployPath = string.Empty;

            strJsonDeployPath = ABFW.PathTools.GetABOutPath() + HotUpdateProcess.HotUpdatePathTool.JSON_DEPLOY_PATH;
            strJsonDeployPath = strJsonDeployPath + "/" + SysDefine.SYS_PATH_UIFORMS_CONFIG_INFO;

            IConfigManager configMgr = new ConfigManagerByJson(strJsonDeployPath);

            //IConfigManager configMgr = new ConfigManagerByJson(SysDefine.SYS_PATH_UIFORMS_CONFIG_INFO);
            if (configMgr != null)
            {
                _DicFormsPaths = configMgr.AppSetting;
            }
        }
Beispiel #7
0
        private static string strLogBufferNumber = null;    //日志缓存最大容量



        /// <summary>
        /// 静态构造函数
        /// </summary>
        static Log()
        {
            //日志缓存数据
            _LiLogArray = new List <string>();

            //日志文件路径
            IConfigManager configMgr = new ConfigManagerByJson(SysDefine.SYS_PATH_CONFIG_INFO);

            //PC与编辑器环境下的路径,使用配置文件。
#if UNITY_STANDALONE_WIN || UNITY_EDITOR
            string strPCTruePath = configMgr.AppSetting[JSON_CONFIG_LOG_DRIVE_NAME] + ":\\" + configMgr.AppSetting[JSON_CONFIG_LOG_PATH] + ".txt";
            _LogPath = strPCTruePath;
#endif

            //日志状态(部署模式)
            strLogState = configMgr.AppSetting[JSON_CONFIG_LOG_STATE];
            //日志最大容量
            strLogMaxCapacity = configMgr.AppSetting[JSON_CONFIG_LOG_MAX_CAPACITY];
            //日志缓存最大容量
            strLogBufferNumber = configMgr.AppSetting[JSON_CONFIG_LOG_BUFFER_NUMBER];

            //日志文件路径
            if (string.IsNullOrEmpty(_LogPath))
            {
                _LogPath = UnityEngine.Application.persistentDataPath + "//" + JSON_CONFIG_LOG_DEFAULT_PATH;
            }

            //日志状态(部署模式)
            if (!string.IsNullOrEmpty(strLogState))
            {
                switch (strLogState)
                {
                case JSON_CONFIG_LOG_STATE_DEVELOP:
                    _LogState = State.Develop;
                    break;

                case JSON_CONFIG_LOG_STATE_SPECIAL:
                    _LogState = State.Speacial;
                    break;

                case JSON_CONFIG_LOG_STATE_DEPLOY:
                    _LogState = State.Deploy;
                    break;

                case JSON_CONFIG_LOG_STATE_STOP:
                    _LogState = State.Stop;
                    break;

                default:
                    _LogState = State.Stop;
                    break;
                }
            }
            else
            {
                _LogState = State.Stop;
            }

            //日志最大容量
            if (!string.IsNullOrEmpty(strLogMaxCapacity))
            {
                _LogMaxCapacity = Convert.ToInt32(strLogMaxCapacity);
            }
            else
            {
                _LogMaxCapacity = LOG_DEFAULT_MAX_CACITY_NUMBER;
            }

            //日志缓存最大容量
            if (!string.IsNullOrEmpty(strLogBufferNumber))
            {
                _LogBufferMaxNumber = Convert.ToInt32(strLogBufferNumber);
            }
            else
            {
                _LogBufferMaxNumber = LOG_DEFAULT_MAX_LOG_BUFFER_NUMBER;
            }
        }//Log_end(构造函数)