Example #1
0
        public bool TryGetText(string key, string language, ref string value)
        {
            TextConfig strCfg = GetCfg(key);

            if (strCfg == null)
            {
                return(false);
            }

            /*switch (language)
             * {
             *  case "cn":
             *      value = strCfg.Cn;
             *      break;
             *
             *  case "en":
             *      value = strCfg.En;
             *      break;
             *
             *  case "tw":
             *      value = strCfg.Tw;
             *      break;
             * }
             *
             * if (string.IsNullOrEmpty(value))
             * {
             *  value = strCfg.Cn;
             * }*/
            value = strCfg.Text;

            return(true);
        }
Example #2
0
        /// <summary>
        /// 得到字符串
        /// 可以使用GetText(kye, new []{xx,xx})的用法
        /// </summary>
        /// <param name="key"></param>
        /// <param name="paramArr"></param>
        /// <returns></returns>
        public string GetText(string key, params string[] paramArr)
        {
            TextConfig cfg = GetCfg(key);

            if (cfg == null)
            {
                return(null);
            }

            if (paramArr.Length == 0)
            {
                return(cfg.Text);
            }
            else
            {
                return(StrHelper.ReplaceString(cfg.Text, paramArr));
            }
        }
Example #3
0
 private void ProcessRowExt(TextConfig excel)
 {
     //在这里对配置的解析进行扩展
 }