Exemple #1
0
        private void txtIP_Validating(object sender, CancelEventArgs e)
        {
            string error;

            if (!ValidationInput.ValidateIP(txtIP.Text, out error))
            {
                errorProvider1.SetError(txtIP, error);
                e.Cancel = true;
            }
        }
Exemple #2
0
        private void cmbColours_Validating(object sender, CancelEventArgs e)
        {
            string error;

            if (!ValidationInput.ValidateColor(cmbColours.Text, out error))
            {
                errorProvider1.SetError(cmbColours, error);
                e.Cancel = true;
            }
        }