private void InitLangTypes() { ListLanugages.Clear(); if (SessionInfo != null && SessionInfo.SupportLangTypes != null) { for (int i = 0; i < SessionInfo.SupportLangTypes.Count; i++) { LangTypeInfo langType = SessionInfo.SupportLangTypes[i]; LangInfoItem langInfoItem = new LangInfoItem(); langInfoItem.Code = langType.LangID; langInfoItem.Display = langType.Display; ListLanugages.Add(langInfoItem); } } }
private void Init() { InitLanguageInfos(); InitThemes(); if (ThemeInfo != null) { ThemeInfoItem item = ListThemes.FirstOrDefault(t => t.Name == ThemeInfo.Name); if (item != null) { item.IsSelected = true; } } InitLangTypes(); if (LangTypeInfo != null) { LangInfoItem lang = ListLanugages.FirstOrDefault(l => l.Code == LangTypeInfo.LangID); if (lang != null) { lang.IsSelected = true; } } }