Пример #1
0
 protected Object CrossThreadGetSelectedItem(ListBox lbox)
 {
     if (this.InvokeRequired)
     {
         CrossThreadGetSelectedItemDelegate d = this.CrossThreadGetSelectedItem;
         return(this.Invoke(d, new Object[] { lbox }));
     }
     return(lbox.SelectedItem);
 }
Пример #2
0
 protected Object CrossThreadGetSelectedItem(ListBox lbox)
 {
     if (this.InvokeRequired)
     {
         CrossThreadGetSelectedItemDelegate d = new CrossThreadGetSelectedItemDelegate(this.CrossThreadGetSelectedItem);
         return this.Invoke(d, new Object[] { lbox });
     } 
     else 
     {
         return lbox.SelectedItem;
     }
 }