public void UpdateCombo2(String Name) { // 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) { UpdateCombo2Callback d = new UpdateCombo2Callback(UpdateCombo2); this.Invoke(d, new object[] { Name }); } else { comboBoxDecks2.Items.Add(Name); } }
public void UpdateCombo2(String Name) { // 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) { UpdateCombo2Callback d = new UpdateCombo2Callback(UpdateCombo2); this.Invoke(d, new object[] { Name }); } else { comboBoxDecks2.Items.Add(Name); } }