示例#1
0
        /// <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);
        }
示例#2
0
 /// <summary>
 /// 是否包含错误信息
 /// </summary>
 public bool HasError()
 {
     return(VerifyManager.Verify(this));
 }
示例#3
0
 /// <summary>
 /// 是否包含错误信息
 /// </summary>
 public bool InputtingVerify(bool showError = false)
 {
     return(VerifyManager.Verify(this));
 }