public void CacheLastSelectedIndices(MusicListBox box) { lastSelectedIndices.Clear(); foreach (int i in box.SelectedIndices) { // tool.Debug("Selected index: ", i); lastSelectedIndices.Add(i); } }
public void CopyFrom(MusicListBox listBox) { if (listBox == null) { return; } Items.Clear(); foreach (ListViewItem item in listBox.Items) { ListViewItem i = (ListViewItem)item.Clone(); // i.ForeColor = item.ForeColor; // i.BackColor = item.BackColor; i.SubItems[0].Tag = item.SubItems[0].Tag; i.Selected = item.Selected; Items.Add(i); } }