private void cleanersCB_SelectedIndexChanged(object sender, EventArgs e) { clearButton.Enabled = true; IBrowserCleaner cleaner = (IBrowserCleaner)cleanersCB.SelectedItem; if (cleaner == null) { filesToRemoveLB.Items.Clear(); return; } filesToRemoveLB.Items.Clear(); filesToRemoveLB.Items.AddRange(cleaner.FilesToRemove()); }