Пример #1
0
 private void RedrawDeck(int DeckNumber)
 {
     if (DeckNumber == 1)
     {
         listBox1.Items.Clear();
         foreach (string cardName in deck1.GetCardNames())
         {
             listBox1.Items.Add(cardName);
         }
         label1.Text = "Deck #1 (" + deck1.Count + " cards)";
     }
     else
     {
         listBox2.Items.Clear();
         foreach (string cardName in deck2.GetCardNames())
         {
             listBox2.Items.Add(cardName);
         }
         label2.Text = "Deck #2 (" + deck2.Count + " cards)";
     }
 }
Пример #2
0
 public void RedrawDeck(int deckNumber)
 {
     if (deckNumber == 1)
     {
         deckList1.Items.Clear();
         foreach (string cardName in deck1.GetCardNames())
         {
             deckList1.Items.Add(cardName);
         }
         labelDeck1.Text = "Deck #1 (" + deck1.Count + " cards)";
     }
     else
     {
         deckList2.Items.Clear();
         foreach (string cardName in deck2.GetCardNames())
         {
             deckList2.Items.Add(cardName);
         }
         labelDeck2.Text = "Deck #2 (" + deck2.Count + " cards)";
     }
 }