Exemplo n.º 1
0
 public void Clear()
 {
     if (this.InvokeRequired)
     {
         ClearListBox dlgt = new ClearListBox(Clear);
         Invoke(dlgt);
     }
     else
     {
         this.Items.Clear();
     }
 }
Exemplo n.º 2
0
 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();
     }
 }