private void AddListBox(string value, ListBox ctl) { if (InvokeRequired) { AddListBoxCallBack uu = new AddListBoxCallBack(AddListBox); this.Invoke(uu, value, ctl); } else { ctl.Items.Add(value); } }
public Service(ListBox listbox) { this.listbox = listbox; addListBoxCallBack = new AddListBoxCallBack(AddListBoxItem); }