/// <summary> /// Set all controls to appropriate states for the current list selections. /// </summary> void EnableControls() { addButton.Enabled = optionsList.SelectedIndex >= 0; // We could use OkToRemove here, but we'd rather be able to display the message // if there is some reason not to. int listIndex = CurrentListIndex; removeButton.Enabled = listIndex >= 0; //Enhance: && m_choices.OkToRemove(listIndex); moveDownButton.Enabled = listIndex >= 0 && m_choices.OkToMoveDown(listIndex); moveUpButton.Enabled = listIndex >= 0 && m_choices.OkToMoveUp(listIndex); UpdateWsComboValue(); wsCombo.Enabled = listIndex >= 0 && m_choices.OkToChangeWritingSystem(listIndex); }