/// <summary> /// 验证是否通过 /// </summary> /// <param name="showError">是否显示错误信息</param> /// <returns>验证结果(true为通过,false为不通过)</returns> public bool Verify(bool showError = false) { var result = VerifyManager.Verify(this); if (result) { _hasError = false; HideToolTip(); _changBorderColor = false; BorderColor = _defaultBorderColor; _changBorderColor = true; } else { _changBorderColor = false; BorderColor = Color.Red; _changBorderColor = true; _hasError = true; ShowToolTip(); } Invalidate(); return(result); }
/// <summary> /// 是否包含错误信息 /// </summary> public bool HasError() { return(VerifyManager.Verify(this)); }
/// <summary> /// 是否包含错误信息 /// </summary> public bool InputtingVerify(bool showError = false) { return(VerifyManager.Verify(this)); }