private void customValidator9_ValidateValue(object sender, DevComponents.DotNetBar.Validator.ValidateValueEventArgs e) { if (e.ControlToValidate.Visible) { if (Proceso == 2) { if (e.ControlToValidate.Text.Equals(txtCont2.Text)) { e.IsValid = true; } else { e.IsValid = false; } } else { e.IsValid = true; } } else { e.IsValid = true; } }
private void customValidator7_ValidateValue(object sender, DevComponents.DotNetBar.Validator.ValidateValueEventArgs e) { ComboBox c = (ComboBox)e.ControlToValidate; if (c.Enabled) { if (Proceso != 0 && c.Visible) { if (c.SelectedIndex != -1) { e.IsValid = true; } else { e.IsValid = false; } } else { e.IsValid = true; } } else { e.IsValid = true; } }
private void customValidator5_ValidateValue(object sender, DevComponents.DotNetBar.Validator.ValidateValueEventArgs e) { if (Proceso != 0) { if (e.ControlToValidate.Enabled) { if (e.ControlToValidate.Text != "") { e.IsValid = true; } else { e.IsValid = false; } } else { e.IsValid = true; } } else { e.IsValid = true; } }
private void customValidator1_ValidateValue(object sender, DevComponents.DotNetBar.Validator.ValidateValueEventArgs e) { if (e.ControlToValidate.Text.Length == 11) { e.IsValid = true; } else { e.IsValid = false; } }
private void customValidator4_ValidateValue(object sender, DevComponents.DotNetBar.Validator.ValidateValueEventArgs e) { if (codArticulo2 < codArticulo1) { e.IsValid = true; } else { e.IsValid = false; } }
private void customValidator4_ValidateValue(object sender, DevComponents.DotNetBar.Validator.ValidateValueEventArgs e) { ComboBox c = (ComboBox)e.ControlToValidate; if (c.SelectedIndex != -1) { e.IsValid = true; } else { e.IsValid = false; } }
private void _validator_CustomValidatorValidateValue(object sender, DevComponents.DotNetBar.Validator.ValidateValueEventArgs e) { e.IsValid = true; _decisionTreeValidator.ErrorMessage = Resources.ErrorGenericInvalidTree; if (e.ControlToValidate == _decisionTree) { if (_decisionTree.DisplayRootNode != null) { e.IsValid = Validate(_decisionTree.DisplayRootNode); } } }
private void customValidator4_ValidateValue(object sender, DevComponents.DotNetBar.Validator.ValidateValueEventArgs e) { //ComboBox c = (ComboBox)e.ControlToValidate; //if (c.Enabled) // if (Proceso != 0) // if (c.SelectedIndex != -1) // e.IsValid = true; // else // e.IsValid = false; // else // e.IsValid = true; //else e.IsValid = true; }
private void customValidator2_ValidateValue(object sender, DevComponents.DotNetBar.Validator.ValidateValueEventArgs e) { if (Proceso != 0) { if (dgvDetalle.Rows.Count > 0) { e.IsValid = true; } else { e.IsValid = false; } } else { e.IsValid = true; } }
private void customValidator4_ValidateValue(object sender, DevComponents.DotNetBar.Validator.ValidateValueEventArgs e) { DataGridView tabla = (DataGridView)e.ControlToValidate; if (Proceso != 0) { if (tabla.Rows.Count >= 1) { e.IsValid = true; } else { e.IsValid = false; } } else { e.IsValid = true; } }
private void CustomValidator2_ValidateValue(object sender, DevComponents.DotNetBar.Validator.ValidateValueEventArgs e) { e.IsValid = IsVersionValid(e.ControlToValidate.Text) || string.IsNullOrEmpty(e.ControlToValidate.Text); }
/// <summary> /// Is the given name "free" /// </summary> private void OnValidateNameExists(object sender, DevComponents.DotNetBar.Validator.ValidateValueEventArgs e) { var name = tbName.Text.Trim(); e.IsValid = !manager.Contains(name); }
/// <summary> /// Is the given name a valid AVD name? /// </summary> private void OnValidateNameIsValid(object sender, DevComponents.DotNetBar.Validator.ValidateValueEventArgs e) { var name = tbName.Text.Trim(); e.IsValid = (name.Length > 0) && !ProcessRunner.ContainEscapeCharacter(name); }