public void AddListBoxItem(object item) { if (this.InvokeRequired) { AddListBoxItemCallback callback = new AddListBoxItemCallback(AddListBoxItem); this.Invoke(callback, new object[] { item }); } else { this.listBox1.Items.Add(item); } }
public void AddListBoxItem(ListBox listBox, string item) { if (listBox.InvokeRequired) { AddListBoxItemCallback de = new AddListBoxItemCallback(DoAddListBoxItem); listBox.Invoke(de, new object[] { listBox, item }); } else { DoAddListBoxItem(listBox, item); } }
public void AddListBoxItem(string item) { if (this.InvokeRequired) { AddListBoxItemCallback callback = new AddListBoxItemCallback(AddListBoxItem); this.Invoke(callback, new string[] { item }); } else { this.lbKeywordList.Items.Add(item); alertList.Add(item); } }
public void AddListBoxItem(string item, string to) { if (this.InvokeRequired) { AddListBoxItemCallback callback = new AddListBoxItemCallback(AddListBoxItem); this.Invoke(callback, new string[] { item }); } else { if (to == "Name") { this.lb_Byname.Items.Add(item); } if (to == "App") { this.lb_Byapp.Items.Add(item); } //alertList.Add(item); } }
public FormAsyncChat() { InitializeComponent(); listBoxCallback = new AddListBoxItemCallback(AddListBoxItem); }