Ejemplo n.º 1
0
    public ChampSelectPlayer(PlayerParticipant player, PlayerChampionSelectionDTO selection) : this() {
      if (player.SummonerId == Session.Current.Account.SummonerID)
        Glow.Opacity = 1;

      DisplaySelection(selection);

      NameLabel.Content = player.SummonerName;
      if (string.IsNullOrWhiteSpace(player.SummonerName))
        NameLabel.Visibility = Visibility.Collapsed;
      else
        NameLabel.Visibility = Visibility.Visible;
    }
Ejemplo n.º 2
0
 private void DisplaySelection(PlayerChampionSelectionDTO selection) {
   if (selection?.Spell1Id > 0 && selection?.Spell2Id > 0 && selection?.ChampionId > 0) {
     ChampImage.Source = DataDragon.GetChampIconImage(DataDragon.GetChampData(selection.ChampionId)).Load();
     Spell1Image.Source = DataDragon.GetSpellImage(DataDragon.GetSpellData(selection.Spell1Id)).Load();
     Spell2Image.Source = DataDragon.GetSpellImage(DataDragon.GetSpellData(selection.Spell2Id)).Load();
     Unknown.Visibility = Obscure.Visibility = Visibility.Collapsed;
   } else if (selection?.Spell1Id > 0 && selection?.Spell2Id > 0) {
     Spell1Image.Source = DataDragon.GetSpellImage(DataDragon.GetSpellData(selection.Spell1Id)).Load();
     Spell2Image.Source = DataDragon.GetSpellImage(DataDragon.GetSpellData(selection.Spell2Id)).Load();
     Grid.SetColumnSpan(Unknown, 1);
     Grid.SetColumnSpan(Obscure, 1);
     Unknown.Visibility = Obscure.Visibility = Visibility.Visible;
   } else {
     Unknown.Visibility = Obscure.Visibility = Visibility.Visible;
   }
 }
Ejemplo n.º 3
0
    public ChampSelectPlayer(ObfuscatedParticipant obfusc, PlayerChampionSelectionDTO selection) : this() {
      DisplaySelection(selection);

      NameLabel.Visibility = Visibility.Collapsed;
    }