/// <summary>
 /// Função reponsavel por recarregar a lista de baralhos
 /// </summary>
 private void RefreshDeckList()
 {
     lbBaralhos.Items.Clear();
     foreach (Deck deck in deckRepo.GetDecksList())
     {
         lbBaralhos.Items.Add(deck.Name + "\t" + deck.Cards.Count + " Carta(s)");
     }
 }
示例#2
0
 /// <summary>
 /// Preenche a comboBox cbBaralho1 com os baralhos
 /// existentes e seleciona o primeiro item
 /// </summary>
 public void fillBaralhos()
 {
     listaDecks1 = deckRepo.GetDecksList();
     cbBaralho1.Items.Clear();
     foreach (Deck deck in listaDecks1)
     {
         cbBaralho1.Items.Add(deck.Name);
     }
     if (listaDecks1.Count >= 2)
     {
         cbBaralho1.SelectedIndex = 0;
     }
     else
     {
         DadosIncuficientes("Baralhos", "Baralhos insuficientes para criar um jogo!");
     }
 }