Esempio n. 1
0
 private BitmapImage FindMedal(bool ranked, string tier, string division)
 {
     if (!ranked)
     {
         return(new BitmapImage(new Uri(medalURI + "unranked.png")));
     }
     else
     {
         int    div   = EloCheckUtility.RomanNumeralToInt(division);
         string medal = tier + (div == -1 ? "" : "_" + div);
         return(new BitmapImage(new Uri(medalURI + medal + ".png")));
     }
 }
Esempio n. 2
0
            public GamePlayerViewModel(GamePlayer player)
            {
                Name = player.name;
                if (player.champ != null)
                {
                    string champ = player.champ.Replace(" ", string.Empty).Replace("'", string.Empty).ToLowerInvariant();
                    Portrait = new BitmapImage(new Uri(portraitURI + champ + "_square_0.png"));
                }
                else
                {
                    Portrait = null;
                }

                int    div   = EloCheckUtility.RomanNumeralToInt(player.division);
                string medal = player.tier + (div == -1 ? "" : "_" + div);

                DivisionMedal = new BitmapImage(new Uri(medalURI + medal + ".png"));
            }