private void ClearListViewStatuses() { for (int i = 0; i < listViewSourceFiles.Items.Count; i++) { FileConvertListViewItem li = listViewSourceFiles.Items[i] as FileConvertListViewItem; if (li != null) { li.SubItems["status"].Text = ""; } } }
void convertWorker_OnListItemUpdate(object sender, ListItemUpdateEventArgs e) { if (workerId != e.Id) { return; } if (e.Index < listViewSourceFiles.Items.Count) { FileConvertListViewItem li = listViewSourceFiles.Items[e.Index] as FileConvertListViewItem; if (li != null) { li.SubItems["status"].Text = e.Message ?? string.Empty; this.Refresh(); } } }
List <FileConvertItem> GetSourceFileListData() { List <FileConvertItem> lst = new List <FileConvertItem>(listViewSourceFiles.Items.Count); for (int i = 0; i < listViewSourceFiles.Items.Count; i++) { FileConvertListViewItem li = listViewSourceFiles.Items[i] as FileConvertListViewItem; if (li != null) { FileConvertItem dataitem = li.Tag as FileConvertItem; if (dataitem != null) { lst.Add(dataitem); } } } return(lst); }