private void SelectPresetIfExists()
{
_updatingControls = true;
Size wanted_size = new Size((int)udWidth.Value, (int)udHeight.Value);
int preset_index = _sizePresets.IndexOf(wanted_size);
if (preset_index >= 0)
{
cbResolutionPreset.SelectedIndex = preset_index;
EnableCustomItem(false);
}
else
{
EnableCustomItem(true);
cbResolutionPreset.SelectedIndex = _customItemIndex;
}
_updatingControls = false;
}