private void txtPort_Validating(object sender, CancelEventArgs e) { string error; if (!ValidationInput.ValidatePort(txtPort.Text, out error)) { errorProvider1.SetError(txtPort, error); e.Cancel = true; } }
private void cmbColours_Validating(object sender, CancelEventArgs e) { string error; if (!ValidationInput.ValidateColor(cmbColours.Text, out error)) { errorProvider1.SetError(cmbColours, error); e.Cancel = true; } }
private void txtName_Validating(object sender, CancelEventArgs e) { string error; if (!ValidationInput.ValidateUserName(txtUserName.Text, out error)) { errorProvider1.SetError(txtUserName, error); e.Cancel = true; } }