/// <summary> /// 设置语言文件 /// </summary> /// <param name="langFile">文件名不含路径,但包含后缀名。</param> public static void SetLang(string langFile = "") { if (!String.IsNullOrWhiteSpace(langFile)) { LangHelper.langFile = langFile; } else { LangHelper.langFile = LangHelper.langDefaultFile; } if (dictionaryLangs == null) { dictionaryLangs = new System.Collections.Specialized.HybridDictionary(); } dictionaryLangs.Clear(); if (languages != null && languages.Count > 0) { var language = languages.FirstOrDefault(o => o.LanguageFile == langFile); if (language != null) { var culture = System.Globalization.CultureInfo.CreateSpecificCulture(language.ID); System.Threading.Thread.CurrentThread.CurrentCulture = culture; System.Threading.Thread.CurrentThread.CurrentUICulture = culture; } } }
public void Clear() { foreach (string key in list.Keys) { this[key].Clear(); } list.Clear(); }
public void Clear() { m_hybridDictionary.Clear(); }