Esempio n. 1
0
    private void InitPathData()
    {
        IConfigManager configMgr = new ConfigManagerByJson(SysDefine.MODEL_PATH_CONFIG_INFO);

        if (configMgr != null)
        {
            modelPathDic = configMgr.AppSetting;
        }
    }
Esempio n. 2
0
    /// <summary>
    /// 初始化“UI窗口预设”路径数据
    /// </summary>
    private void InitUIFormPathData()
    {
        IConfigManager configMgr = new ConfigManagerByJson(SysDefine.SYS_PATH_UIFORMS_CONFIG_INFO);

        if (_dicFormsPaths != null)
        {
            _dicFormsPaths = configMgr.AppSetting;
        }
    }
Esempio n. 3
0
    private void InitLanguageCache()
    {
        IConfigManager config = new ConfigManagerByJson("LanguageJSONConfig");

        if (config != null)
        {
            _dicLanguageCache = config.AppSetting;
        }
    }
Esempio n. 4
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(构造函数)