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

            if (!ValidationInput.ValidatePort(txtPort.Text, out error))
            {
                errorProvider1.SetError(txtPort, error);
                e.Cancel = true;
            }
        }
Beispiel #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;
            }
        }
Beispiel #3
0
        private void txtName_Validating(object sender, CancelEventArgs e)
        {
            string error;

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