private void AddColor(IColor c) { CrossThreading.UIInvoke(() => { foreach (ListViewItem item in recordView.Items) { if (item.SubItems[1].Text == c.ToString()) { return; } } Copy(c); ListViewItem itm = PaletteManager.Add(selectedPaletteName, c, GetItemIconIndex(c)); recordView.Items.Add(itm); recordView.EnsureVisible(recordView.Items.Count - 1); }); }