/** We've hashed a file, now we want to add it to the list on-screen */ protected void AddFileToGrid(QueueItem item, string hash) { bool?good = kb.CheckFile(item.partialpath, hash); Debug.Assert(this.InvokeRequired == false); string verified = good == null ? "Unknown" : (good.Value ? "Good" : "BAD"); if (IsMD5File(item.partialpath)) { verified = "Loaded"; } ListViewItem lvi = new ListViewItem(new string[] { item.partialpath, hash, "" + item.size, verified }); if (verified == "BAD") { lvi.BackColor = Color.Yellow; hashErrors++; } listView.Items.Add(lvi); // listView.EnsureVisible(listView.Items.Count-1); unmatchedHashesLabel.Text = "" + kb.UnfoundCount; EnableAlert(hashErrors > 0); }