示例#1
0
 protected void CrossThreadAlterSubItem(ListViewItem item, int index, String text)
 {
     if (this.InvokeRequired)
     {
         CrossThreadAlterSubItemDelegate d = new CrossThreadAlterSubItemDelegate(this.CrossThreadAlterSubItem);
         this.Invoke(d, new Object[] { item, index, text });
     }
     else
     {
         item.SubItems[index] = new ListViewItem.ListViewSubItem(item, text);
     }
 }
 protected void CrossThreadAlterSubItem(ListViewItem item, int index, String text)
 {
     if (this.InvokeRequired)
     {
         CrossThreadAlterSubItemDelegate d = new CrossThreadAlterSubItemDelegate(this.CrossThreadAlterSubItem);
         this.Invoke(d, new Object[] { item, index, text });
     }
     else
     {
         item.SubItems[index] = new ListViewItem.ListViewSubItem(item, text);
     }
 }