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

cboStates_Validating() private method

private cboStates_Validating ( object sender, CancelEventArgs e ) : void
sender object
e CancelEventArgs
return void
        private void cboStates_Validating(object sender, CancelEventArgs e)
        {
            //this can now be blank
            string errMessage = string.Empty;

            bool valid = ((AcsState)cboStates.SelectedValue != AcsState.None);
            if (!valid)
            {
                errMessage = "Please select a state from the list";
            }

            this.errorProvider1.SetError(this.cboStates, errMessage);
        }