예제 #1
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");
            }
        }
예제 #2
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);
            }
        }