private void RefreshSoundsList() { var selectedItem = SelectedSound; listBoxAllSounds.ClearSelected(); listBoxAllSounds.Items.Clear(); listBoxAllSounds.Items.AddRange(soundsLibrary.GetAllSounds().Cast <object>().ToArray()); if (selectedItem != null) { listBoxAllSounds.SelectedItem = selectedItem; } }
void RefreshList() { listBox1.Items.Clear(); listBox1.Items.AddRange(soundsLibrary.GetAllSounds().Cast <object>().ToArray()); }