Azavea.NijPredictivePolicing.AcsAlchemistGui.MainForm.cboProjections_Validating C# (CSharp) Method

cboProjections_Validating() private method

private cboProjections_Validating ( object sender, CancelEventArgs e ) : void
sender object
e CancelEventArgs
return void
        private void cboProjections_Validating(object sender, CancelEventArgs e)
        {
            bool listSelected = radioSRIDFromList.Checked;
            bool valueInList = cboProjections.SelectedIndex != -1;
            string errorMessage = string.Empty;

            //if our radio button is selected.
            //if the value is not in the list
            if (listSelected && !valueInList)
            {
                errorMessage = "Unknown SRID";
            }

            this.errorProvider1.SetError(cboProjections, errorMessage);
        }