Ejemplo n.º 1
0
 public void UpdateDecks(ArrayList NewCards)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.dataGridViewCollection.InvokeRequired)
     {
         UpdateDecksCallback d = new UpdateDecksCallback(UpdateDecks);
         this.Invoke(d, new object[] { NewCards });
     }
     else
     {
         // mmb - add to the current deck, don't overwrite
         dataGridViewDeck.DataSource = NewCards;
         UpdateCollectionGrid();
     }
 }
Ejemplo n.º 2
0
 public void UpdateDecks(ArrayList NewCards)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.dataGridViewCollection.InvokeRequired)
     {
         UpdateDecksCallback d = new UpdateDecksCallback(UpdateDecks);
         this.Invoke(d, new object[] { NewCards });
     }
     else
     {
         // mmb - add to the current deck, don't overwrite
         dataGridViewDeck.DataSource = NewCards;
         UpdateCollectionGrid();
     }
 }