protected override void OnLoad(EventArgs e) { base.OnLoad(e); CultureInfo[] cis = CultureInfo.GetCultures(CultureTypes.SpecificCultures); List <LanguageInfo> list = new List <LanguageInfo>(); LanguageInfo[] langs = _appItem.Language.ReLoad(); foreach (CultureInfo ci in cis) { LanguageInfo addedLI = new LanguageInfo(ci.Name, ci.DisplayName, ci.EnglishName); foreach (LanguageInfo li in langs) { if (li.ToString().Equals(addedLI.ToString())) { addedLI = null; break; } } if (addedLI == null) { continue; } list.Add(addedLI); } list.Sort(CompareDinosByLanguageInfo); _cmbLanguages.Items.AddRange(list.ToArray()); _lblApplication.Text = string.Format(Global.Languages["AppList"]["Application ID: {0}"], _appItem.Language.AppId); }
private static int CompareDinosByLanguageInfo(LanguageInfo li1, LanguageInfo li2) { return(li1.ToString().CompareTo(li2.ToString())); }