Esempio n. 1
0
 private void UpdateAllListViewItems()
 {
     for (int i = 0, loopTo = ListViewEx_TM_TableEntries.Items.Count - 1; i <= loopTo; i++)
     {
         UpdateListViewItem(i, false);
     }
     ListViewEx_TM_TableEntries.Refresh();
 }
Esempio n. 2
0
 private void UpdateListViewItem(ListViewItem lvi, string dialogDescription, string itemText, bool refresh = true)
 {
     if (string.IsNullOrEmpty(itemText))
     {
         itemText = "-";
     }
     else
     {
         var sr = new StringReader(itemText);
         itemText = sr.ReadLine();
         sr.Dispose();
     }
     lvi.SubItems[2].Text = itemText;
     if (dialogDescription is string)
     {
         lvi.SubItems[1].Text = dialogDescription;
     }
     if (refresh)
     {
         ListViewEx_TM_TableEntries.Refresh();
     }
 }