/// <summary>
 /// 初始化 <see cref="TextResourceReader"/> 实例,
 /// 并将 <see cref="LocalizationTextReousrceCollection"/>对象中的文本资源加载到对象中
 /// </summary>
 /// <param name="textReousrceCollection"></param>
 protected virtual void InitlizeReader(LocalizationTextReousrceCollection textReousrceCollection)
 {
     foreach (TextPair pair in textReousrceCollection.Pairs)
     {
         this.Add(pair.Key, pair.Value);
     }
     this.TextReousrceCollection = textReousrceCollection;
 }
Exemple #2
0
        /// <summary>
        /// 加载符合当前操作系统区域设置的文本资源集合,
        /// 若无则尝试获取可用的文本资源,
        /// 再次失败则返回默认的文本资源
        /// </summary>
        /// <returns></returns>
        public static LocalizationTextReousrceCollection LoadSystemCultureInfo()
        {
            String name = CultureInfoHelper.Name;
            LocalizationTextReousrceCollection collection = null;

            //TKXmlSerializer.Search<LocalizationCollection>();
            return(collection);
        }
 public TextResourceReader(LocalizationTextReousrceCollection textReousrceCollection)
 {
     this.InitlizeReader(textReousrceCollection);
 }