Example #1
0
 private void SetLogItemImageIndex(ListViewItem item, IMAGE_KEYS index)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (ConvertLogLV.InvokeRequired)
     {
         SetLogItemImageIndexCallback d = new SetLogItemImageIndexCallback(SetLogItemImageIndex);
         ConvertLogLV.BeginInvoke(d, new object[] { item, index });
     }
     else
     {
         item.ImageIndex = (int)index;
         ConvertLogLV.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
     }
 }
 private void SetLogItemImageIndex(ListViewItem item, IMAGE_KEYS index)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (ConvertLogLV.InvokeRequired)
     {
         SetLogItemImageIndexCallback d = new SetLogItemImageIndexCallback(SetLogItemImageIndex);
         ConvertLogLV.BeginInvoke(d, new object[] { item, index });
     }
     else
     {
         item.ImageIndex = (int)index;
         ConvertLogLV.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
     }
 }