public void UpdateListBox(int index, string text) { if (_listView != null) { if (_listView.InvokeRequired) { delegateUpdateListBox deleg = new delegateUpdateListBox(UpdateListBox); _listView.Invoke(deleg, new object[] { index, text }); } else { _listView.Items.Insert(index, text); } } }
public void WriteListBox(string text) { if (_listView != null) { if (_listView.InvokeRequired) { delegateUpdateListBox deleg = new delegateUpdateListBox(WriteListBox); _listView.Invoke(deleg, new object[] { text }); } else { _listView.Items.Add(text); } } }