mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-26 05:02:36 +01:00
[internal] - minor refactor add item to listview
This commit is contained in:
parent
b3489ea40e
commit
1c9b09ceb0
@ -61,12 +61,8 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
private void AddToListView(Paragraph p, string lineNumbers, string newText)
|
private void AddToListView(Paragraph p, string lineNumbers, string newText)
|
||||||
{
|
{
|
||||||
var item = new ListViewItem(string.Empty) { Tag = p, Checked = true };
|
var item = new ListViewItem(string.Empty) { Tag = p, Checked = true };
|
||||||
|
item.SubItems.Add(lineNumbers.TrimEnd(','));
|
||||||
var subItem = new ListViewItem.ListViewSubItem(item, lineNumbers.TrimEnd(','));
|
item.SubItems.Add(newText.Replace(Environment.NewLine, Configuration.Settings.General.ListViewLineSeparatorString));
|
||||||
item.SubItems.Add(subItem);
|
|
||||||
subItem = new ListViewItem.ListViewSubItem(item, newText.Replace(Environment.NewLine, Configuration.Settings.General.ListViewLineSeparatorString));
|
|
||||||
item.SubItems.Add(subItem);
|
|
||||||
|
|
||||||
listViewFixes.Items.Add(item);
|
listViewFixes.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user