void SettingsTextBox_TextChanged(object sender, EventArgs e) { if (DesignMode) { return; } if (_setting.Validate(Text)) { ForeColor = DefaultForeColor; } else { ForeColor = Color.Red; } }
// returns true if the value in the text box is a valid value for the setting // represented by this popup. private bool valueIsValid() { return(selectedSetting.Validate(setValueTextBox.Text)); }