예제 #1
0
 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 = "";
         }
     }
 }
예제 #2
0
 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();
         }
     }
 }
예제 #3
0
        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);
        }