Exemplo n.º 1
0
        public Countries() : base()
        {
            ObservableCollection <ISO3166Country> collection = ISO3166.BuildCountryCollection();

            // This collection built from Wikipedia entry on ISO3166-1 on 9th Feb 2016

            foreach (ISO3166Country country in collection)
            {
                Add(country);
            }
            this.OrderBy(x => x.Alpha3);
        }
Exemplo n.º 2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string input = value as string;

            if (!string.IsNullOrEmpty(input))
            {
                if (input == "EUG" || input == "UEG")
                {
                    return(@"Images/uu.png");
                }
                else
                {
                    return(@"/FamFamFam.Flags.Wpf;component/Images/" + ISO3166.FromAlpha3(input).Alpha2 + ".png");
                }
            }
            else
            {
                return(@"/FamFamFam.Flags.Wpf;component/Images/xx.png");
            }
        }
Exemplo n.º 3
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string      input = value as string;
            Juez        j     = new Juez();
            List <Juez> lj    = new List <Juez>();

            lj = MainWindow.jueces.Where(x => x.JudgeName == input).ToList();
            if (lj.Count > 0)
            {
                j = lj[0];
                if (j.Country.ToUpper() == "EUG" || j.Country.ToUpper() == "UEG")
                {
                    return(@"Images/uu.png");
                }
                else
                {
                    return(@"/FamFamFam.Flags.Wpf;component/Images/" + ISO3166.FromAlpha3(j.Country.ToUpper()).Alpha2 + ".png");
                }
            }
            else
            {
                return(null);
            }
        }