System.Globalization.FormLanguageSwitchSingleton.ReloadComboBoxItems C# (CSharp) Method

ReloadComboBoxItems() private method

Reloads items in the ComboBox. If items are not sorted, selection is kept.
private ReloadComboBoxItems ( System comboBox, System resources ) : void
comboBox System
resources System /// ResourceManager object. ///
return void
		private void ReloadComboBoxItems(System.Windows.Forms.ComboBox comboBox, System.Resources.ResourceManager resources) {
			if (comboBox.Items.Count > 0) {
				int selectedIndex = comboBox.SelectedIndex;
				ReloadItems(comboBox.Name, comboBox.Items, comboBox.Items.Count, resources);
				if (!comboBox.Sorted)
					comboBox.SelectedIndex = selectedIndex;
			}
		}