public void Clear() { if (this.InvokeRequired) { ClearListBox dlgt = new ClearListBox(Clear); Invoke(dlgt); } else { this.Items.Clear(); } }
private void ClearCommandHistory(ListBox listboxControl) { if (listboxControl.InvokeRequired) { ClearListBox c = ClearCommandHistory; Invoke(c, listboxControl); } else { listboxControl.Items.Clear(); } }
private void ClearCommandHistory(ListBox listboxControl) { if (listboxControl.InvokeRequired) { ClearListBox c = new ClearListBox(ClearCommandHistory); this.Invoke(c, new object[] { listboxControl }); } else { listboxControl.Items.Clear(); } }