[internal] - prefer item.SubItems.Add

This commit is contained in:
ivandrofly 2015-09-01 09:56:44 +01:00
parent 0071cda94a
commit cbb9f2891f

View File

@ -242,15 +242,10 @@ namespace Nikse.SubtitleEdit.Forms
private void AddToReplaceListView(bool enabled, string findWhat, string replaceWith, string searchType)
{
var item = new ListViewItem("") { Checked = enabled };
var subItem = new ListViewItem.ListViewSubItem(item, findWhat);
item.SubItems.Add(subItem);
subItem = new ListViewItem.ListViewSubItem(item, replaceWith);
item.SubItems.Add(subItem);
subItem = new ListViewItem.ListViewSubItem(item, searchType);
item.SubItems.Add(subItem);
var item = new ListViewItem(string.Empty) { Checked = enabled };
item.SubItems.Add(findWhat);
item.SubItems.Add(replaceWith);
item.SubItems.Add(searchType);
listViewReplaceList.Items.Add(item);
}