private void ReloadListBoxItems(System.Windows.Forms.ListBox listBox, System.Resources.ResourceManager resources) {
if (listBox.Items.Count > 0) {
int[] selectedItems = new int[listBox.SelectedIndices.Count];
listBox.SelectedIndices.CopyTo(selectedItems, 0);
ReloadItems(listBox.Name, listBox.Items, listBox.Items.Count, resources);
if (!listBox.Sorted) {
for (int i = 0; i < selectedItems.Length; i++) {
listBox.SetSelected(selectedItems[i], true);
}
}
}
}