コード例 #1
0
        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);
        }
コード例 #2
0
 private static int CompareDinosByLanguageInfo(LanguageInfo li1, LanguageInfo li2)
 {
     return(li1.ToString().CompareTo(li2.ToString()));
 }