private void UniqueTitles() { var libItemsCount = lvLibItems.Items.Count; double step = libItemsCount / 100; pbLoadUniqueData.Step = (int)step; var time = DateTime.Now; log.Write($"{ time.ToString() }"); log.Write($"> Find unique where libItems count = {lvLibItems.Items.Count} "); // var unique = new Unique(lvLibItems.Items.Cast<ListViewItem>().Select(item => (LibItem)item.Tag).ToList()); var unique = new Unique(libItems); var uniqueItems = unique.GetUnique(); deletedLibItems.AddRange(libItems.Except(uniqueItems).ToList()); libItems = uniqueItems; LoadLibItems(); log.Write($"{ (DateTime.Now - time).TotalSeconds.ToString() } sec."); log.Write("____________________"); pbLoadUniqueData.Value = 100; MessageBox.Show("Готово!"); pbLoadUniqueData.Value = 0; }