Commit 7707ae4c HZH

验证

1 个父辈 635c46c4
......@@ -21,7 +21,8 @@ namespace HZH_Controls.Controls
InitializeComponent();
}
private Control owner;
private Control owner;
[Browsable(true), Category("自定义属性"), Description("父控件"), Localizable(true)]
public Control Owner
{
get { return owner; }
......@@ -29,11 +30,11 @@ namespace HZH_Controls.Controls
{
// The owner form cannot be set to null.
if (value == null)
throw new ArgumentNullException();
return;
// The owner form can only be set once.
if (owner != null)
throw new InvalidOperationException();
return;
// Save the form for future reference.
owner = value;
......
......@@ -369,14 +369,15 @@ namespace HZH_Controls.Controls
/// 处理 Windows 消息。
/// </summary>
/// <param name="m">一个 Windows 消息对象。</param>
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
if (m.Msg == 15 || m.Msg == 7 || m.Msg == 8)
{
this.OnPaint(null);
}
}
//protected override void WndProc(ref Message m)
//{
// base.WndProc(ref m);
// if (m.Msg == 15 || m.Msg == 7 || m.Msg == 8)
// {
// //this.OnPaint(null);
// Invalidate();
// }
//}
/// <summary>
/// Handles the <see cref="E:TextChanged" /> event.
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HZH_Controls.Controls
{
public class VerificationAttribute : Attribute
{
public VerificationAttribute(string strRegex = "", string strErrorMsg = "")
{
Regex = strRegex;
ErrorMsg = strErrorMsg;
}
public string Regex { get; set; }
public string ErrorMsg { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace HZH_Controls.Controls
{
[ProvideProperty("VerificationModel", typeof(Control))]
[ProvideProperty("VerificationCustomRegex", typeof(Control))]
[ProvideProperty("VerificationRequired", typeof(Control))]
[ProvideProperty("VerificationErrorMsg", typeof(Control))]
[DefaultEvent("Verificationed")]
public class VerificationComponent : Component, IExtenderProvider
{
public delegate void VerificationedHandle(VerificationEventArgs e);
[Browsable(true), Category("自定义属性"), Description("验证事件"), Localizable(true)]
public event VerificationedHandle Verificationed;
Dictionary<Control, VerificationModel> m_controlCache = new Dictionary<Control, VerificationModel>();
Dictionary<Control, string> m_controlRegexCache = new Dictionary<Control, string>();
Dictionary<Control, bool> m_controlRequiredCache = new Dictionary<Control, bool>();
Dictionary<Control, string> m_controlMsgCache = new Dictionary<Control, string>();
Dictionary<Control, Forms.FrmAnchorTips> m_controlTips = new Dictionary<Control, Forms.FrmAnchorTips>();
private Color errorTipsBackColor = Color.FromArgb(255, 77, 58);
[Browsable(true), Category("自定义属性"), Description("错误提示背景色"), Localizable(true)]
public Color ErrorTipsBackColor
{
get { return errorTipsBackColor; }
set { errorTipsBackColor = value; }
}
private Color errorTipsForeColor = Color.White;
[Browsable(true), Category("自定义属性"), Description("错误提示文字颜色"), Localizable(true)]
public Color ErrorTipsForeColor
{
get { return errorTipsForeColor; }
set { errorTipsForeColor = value; }
}
#region 构造函数 English:Constructor
public VerificationComponent()
{
}
public VerificationComponent(IContainer container)
: this()
{
container.Add(this);
}
#endregion
#region 指定此对象是否可以将其扩展程序属性提供给指定的对象。 English:Specifies whether this object can provide its extender properties to the specified object.
/// <summary>
/// 指定此对象是否可以将其扩展程序属性提供给指定的对象。
/// </summary>
/// <param name="extendee">要接收扩展程序属性的 <see cref="T:System.Object" />。</param>
/// <returns>如果此对象可以扩展程序属性提供给指定对象,则为 true;否则为 false。</returns>
public bool CanExtend(object extendee)
{
if (extendee is TextBoxBase || extendee is UCTextBoxEx || extendee is ComboBox || extendee is UCCombox)
{
return true;
}
return false;
}
#endregion
#region 验证规则 English:Validation rule
[Browsable(true), Category("自定义属性"), Description("验证规则"), DisplayName("VerificationModel"), Localizable(true)]
public VerificationModel GetVerificationModel(Control control)
{
if (m_controlCache.ContainsKey(control))
{
return m_controlCache[control];
}
else
return VerificationModel.None;
}
public void SetVerificationModel(Control control, VerificationModel vm)
{
m_controlCache[control] = vm;
}
#endregion
#region 自定义正则 English:Custom Rules
[Browsable(true), Category("自定义属性"), Description("自定义验证正则表达式"), DisplayName("VerificationCustomRegex"), Localizable(true)]
public string GetVerificationCustomRegex(Control control)
{
if (m_controlRegexCache.ContainsKey(control))
{
return m_controlRegexCache[control];
}
else
return "";
}
public void SetVerificationCustomRegex(Control control, string strRegex)
{
m_controlRegexCache[control] = strRegex;
}
#endregion
#region 必填 English:Must fill
[Browsable(true), Category("自定义属性"), Description("是否必填项"), DisplayName("VerificationRequired"), Localizable(true)]
public bool GetVerificationRequired(Control control)
{
if (m_controlRequiredCache.ContainsKey(control))
return m_controlRequiredCache[control];
return false;
}
public void SetVerificationRequired(Control control, bool blnRequired)
{
m_controlRequiredCache[control] = blnRequired;
}
#endregion
#region 提示信息 English:Prompt information
[Browsable(true), Category("自定义属性"), Description("验证错误提示信息,当为空时则使用默认提示信息"), DisplayName("VerificationErrorMsg"), Localizable(true)]
public string GetVerificationErrorMsg(Control control)
{
if (m_controlMsgCache.ContainsKey(control))
return m_controlMsgCache[control];
return "";
}
public void SetVerificationErrorMsg(Control control, string strErrorMsg)
{
m_controlMsgCache[control] = strErrorMsg;
}
#endregion
#region 验证 English:Verification
/// <summary>
/// 功能描述:验证 English:Verification result processing
/// 作  者:HZH
/// 创建日期:2019-09-28 09:02:49
/// 任务编号:POS
/// </summary>
/// <param name="c">c</param>
/// <returns>返回值</returns>
public bool Verification(Control c)
{
bool bln = true;
if (m_controlCache.ContainsKey(c))
{
var vm = m_controlCache[c];
string strRegex = "";
string strErrMsg = "";
#region 获取正则或默认错误提示 English:Get regular or error prompts
if (vm == VerificationModel.Custom)
{
//自定义正则
if (m_controlRegexCache.ContainsKey(c))
{
strRegex = m_controlRegexCache[c];
strErrMsg = "不正确的输入";
}
}
else
{
//获取默认正则和错误提示
Type type = vm.GetType(); //获取类型
MemberInfo[] memberInfos = type.GetMember(vm.ToString());
if (memberInfos.Length > 0)
{
var atts = memberInfos[0].GetCustomAttributes(typeof(VerificationAttribute), false);
if (atts.Length > 0)
{
var va = ((VerificationAttribute)atts[0]);
strErrMsg = va.ErrorMsg;
strRegex = va.Regex;
}
}
}
#endregion
#region 取值 English:Value
string strValue = "";
if (c is TextBoxBase)
{
strValue = (c as TextBoxBase).Text;
}
else if (c is UCTextBoxEx)
{
strValue = (c as UCTextBoxEx).InputText;
}
else if (c is ComboBox)
{
var cbo = (c as ComboBox);
if (cbo.DropDownStyle == ComboBoxStyle.DropDownList)
{
strValue = cbo.SelectedItem == null ? "" : cbo.SelectedValue.ToString();
}
else
{
strValue = cbo.Text;
}
}
else if (c is UCCombox)
{
strValue = (c as UCCombox).SelectedText;
}
#endregion
//自定义错误信息
if (m_controlMsgCache.ContainsKey(c) && !string.IsNullOrEmpty(m_controlMsgCache[c]))
strErrMsg = m_controlMsgCache[c];
//检查必填项
if (m_controlRequiredCache.ContainsKey(c) && m_controlRequiredCache[c])
{
if (string.IsNullOrEmpty(strValue))
{
VerControl(new VerificationEventArgs()
{
VerificationModel = vm,
Regex = strRegex,
ErrorMsg = "不能为空",
IsVerifySuccess = false,
Required = true,
VerificationControl = c
});
bln = false;
return false;
}
}
//验证正则
if (!string.IsNullOrEmpty(strValue))
{
if (!string.IsNullOrEmpty(strRegex))
{
if (!Regex.IsMatch(strValue, strRegex))
{
VerControl(new VerificationEventArgs()
{
VerificationModel = vm,
Regex = strRegex,
ErrorMsg = strErrMsg,
IsVerifySuccess = false,
Required = m_controlRequiredCache.ContainsKey(c) && m_controlRequiredCache[c],
VerificationControl = c
});
bln = false;
return false;
}
}
}
//没有问题出发一个成功信息
VerControl(new VerificationEventArgs()
{
VerificationModel = vm,
Regex = strRegex,
ErrorMsg = strErrMsg,
IsVerifySuccess = true,
Required = m_controlRequiredCache.ContainsKey(c) && m_controlRequiredCache[c],
VerificationControl = c
});
}
return bln;
}
#endregion
#region 验证 English:Verification
/// <summary>
/// 功能描述:验证 English:Verification
/// 作  者:HZH
/// 创建日期:2019-09-27 17:54:38
/// 任务编号:POS
/// </summary>
/// <returns>返回值</returns>
public bool Verification()
{
bool bln = true;
foreach (var item in m_controlCache)
{
Control c = item.Key;
if (!Verification(c))
{
bln = false;
}
}
return bln;
}
#endregion
#region 验证结果处理 English:Verification result processing
/// <summary>
/// 功能描述:验证结果处理 English:Verification result processing
/// 作  者:HZH
/// 创建日期:2019-09-27 17:54:59
/// 任务编号:POS
/// </summary>
/// <param name="e">e</param>
private void VerControl(VerificationEventArgs e)
{
//如果成功则移除失败提示
if (e.IsVerifySuccess)
{
if (m_controlTips.ContainsKey(e.VerificationControl))
{
m_controlTips[e.VerificationControl].Close();
m_controlTips.Remove(e.VerificationControl);
}
}
//触发事件
if (Verificationed != null)
{
Verificationed(e);
if (e.IsProcessed)//如果已处理,则不再向下执行
{
return;
}
}
//如果失败则显示提示
if (!e.IsVerifySuccess)
{
if (m_controlTips.ContainsKey(e.VerificationControl))
{
m_controlTips[e.VerificationControl].StrMsg = e.ErrorMsg;
}
else
{
var tips = Forms.FrmAnchorTips.ShowTips(e.VerificationControl, e.ErrorMsg, background: errorTipsBackColor, foreColor: errorTipsForeColor, autoCloseTime: 0, blnTopMost: false);
m_controlTips[e.VerificationControl] = tips;
}
}
}
#endregion
}
}
// ***********************************************************************
// Assembly : HZH_Controls
// Created : 2019-09-27
//
// ***********************************************************************
// <copyright file="VerificationEventArgs.cs">
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
// </copyright>
//
// Blog: https://www.cnblogs.com/bfyx
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
//
// If you use this code, please keep this note.
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace HZH_Controls.Controls
{
/// <summary>
/// Class VerificationEventArgs.
/// Implements the <see cref="System.EventArgs" />
/// </summary>
/// <seealso cref="System.EventArgs" />
public class VerificationEventArgs : EventArgs
{
/// <summary>
/// Gets or sets the verification control.
/// </summary>
/// <value>The verification control.</value>
public Control VerificationControl { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [verify success].
/// </summary>
/// <value><c>true</c> if [verify success]; otherwise, <c>false</c>.</value>
public bool IsVerifySuccess { get; set; }
/// <summary>
/// Gets or sets the verification model.
/// </summary>
/// <value>The verification model.</value>
public VerificationModel VerificationModel { get; set; }
/// <summary>
/// 是否已处理,如果为true,则不再使用默认验证提示功能
/// </summary>
/// <value><c>true</c> if this instance is processed; otherwise, <c>false</c>.</value>
public bool IsProcessed { get; set; }
/// <summary>
/// Gets or sets 正则表达式
/// </summary>
/// <value>The custom regex.</value>
public string Regex { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this <see cref="VerificationEventArgs"/> is required.
/// </summary>
/// <value><c>true</c> if required; otherwise, <c>false</c>.</value>
public bool Required { get; set; }
/// <summary>
/// Gets or sets the error MSG.
/// </summary>
/// <value>The error MSG.</value>
public string ErrorMsg { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
namespace HZH_Controls.Controls
{
/// <summary>
/// 验证规则
/// </summary>
public enum VerificationModel
{
/// <summary>
/// 无
/// </summary>
[Description("无"), VerificationAttribute()]
None = 1,
/// <summary>
/// 任意字母数字下划线
/// </summary>
[Description("任意字母数字下划线"), VerificationAttribute(@"^[a-zA-Z_0-1]*$", "请输入任意字母数字下划线")]
AnyChar = 2,
/// <summary>
/// 任意数字
/// </summary>
[Description("任意数字"), VerificationAttribute(@"^[\-\+]?\d+(\.\d+)?$", "请输入任意数字")]
Number = 4,
/// <summary>
/// 非负数
/// </summary>
[Description("非负数"), VerificationAttribute(@"^(\+)?\d+(\.\d+)?$", "请输入非负数")]
UnsignNumber = 8,
/// <summary>
/// 正数
/// </summary>
[Description("正数"), VerificationAttribute(@"(\+)?([1-9][0-9]*(\.\d{1,2})?)|(0\.\d{1,2})", "请输入正数")]
PositiveNumber = 16,
/// <summary>
/// 整数
/// </summary>
[Description("整数"), VerificationAttribute(@"^[\+\-]?\d+$", "请输入整数")]
Integer = 32,
/// <summary>
/// 非负整数
/// </summary>
[Description("非负整数"), VerificationAttribute(@"^(\+)?\d+$", "请输入非负整数")]
UnsignIntegerNumber = 64,
/// <summary>
/// 正整数
/// </summary>
[Description("正整数"), VerificationAttribute(@"^[0-9]*[1-9][0-9]*$", "请输入正整数")]
PositiveIntegerNumber = 128,
/// <summary>
/// 邮箱
/// </summary>
[Description("邮箱"), VerificationAttribute(@"^(([0-9a-zA-Z]+)|([0-9a-zA-Z]+[_.0-9a-zA-Z-]*[0-9a-zA-Z]+))@([a-zA-Z0-9-]+[.])+([a-zA-Z]{2}|net|NET|com|COM|gov|GOV|mil|MIL|org|ORG|edu|EDU|int|INT)$", "请输入正确的邮箱地址")]
Email = 256,
/// <summary>
/// 手机
/// </summary>
[Description("手机"), VerificationAttribute(@"^(\+?86)?1\d{10}$", "请输入正确的手机号")]
Phone = 512,
/// <summary>
/// IP
/// </summary>
[Description("IP"), VerificationAttribute(@"(?=(\b|\D))(((\d{1,2})|(1\d{1,2})|(2[0-4]\d)|(25[0-5]))\.){3}((\d{1,2})|(1\d{1,2})|(2[0-4]\d)|(25[0-5]))(?=(\b|\D))", "请输入正确的IP地址")]
IP = 1024,
/// <summary>
/// Url
/// </summary>
[Description("Url"), VerificationAttribute(@"^[a-zA-z]+://(//w+(-//w+)*)(//.(//w+(-//w+)*))*(//?//S*)?$", "请输入正确的网址")]
URL = 2048,
/// <summary>
/// 身份证号
/// </summary>
[Description("身份证号"), VerificationAttribute(@"^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$", "请输入正确的身份证号")]
IDCardNo = 4096,
/// <summary>
/// 正则验证
/// </summary>
[Description("自定义正则表达式"), VerificationAttribute()]
Custom = 8192,
}
}
......@@ -140,11 +140,11 @@ namespace HZH_Controls.Forms
Color _foreColor = m_foreColor == null ? Color.White : m_foreColor.Value;
System.Drawing.SizeF sizeText = g.MeasureString(strMsg, _font);
g.Dispose();
var formSize = new Size((int)sizeText.Width + 20, (int)sizeText.Height + 20);
if (formSize.Width < 20)
formSize.Width = 20;
if (formSize.Height < 20)
formSize.Height = 20;
var formSize = new Size((int)sizeText.Width + 10, (int)sizeText.Height + 10);
if (formSize.Width < 10)
formSize.Width = 10;
if (formSize.Height < 10)
formSize.Height = 10;
if (m_location == AnchorTipsLocation.LEFT || m_location == AnchorTipsLocation.RIGHT)
{
formSize.Width += 20;
......@@ -244,7 +244,7 @@ namespace HZH_Controls.Forms
Graphics gBit = Graphics.FromImage(bit);
gBit.SetGDIHigh();
gBit.FillPath(new SolidBrush(_background), path);
gBit.DrawString(strMsg, _font, new SolidBrush(_foreColor), rect.Location + new Size(10, 10));
gBit.DrawString(strMsg, _font, new SolidBrush(_foreColor), rect, new StringFormat() { Alignment= StringAlignment.Center, LineAlignment= StringAlignment.Center});
gBit.Dispose();
#endregion
......@@ -264,6 +264,7 @@ namespace HZH_Controls.Forms
/// <param name="deviation">The deviation.</param>
/// <param name="fontSize">Size of the font.</param>
/// <param name="autoCloseTime">The automatic close time.</param>
/// <param name="blnTopMost">是否置顶</param>
/// <returns>FrmAnchorTips.</returns>
public static FrmAnchorTips ShowTips(
Control parentControl,
......@@ -273,7 +274,8 @@ namespace HZH_Controls.Forms
Color? foreColor = null,
Size? deviation = null,
int fontSize = 10,
int autoCloseTime = 5000)
int autoCloseTime = 5000,
bool blnTopMost=true)
{
Point p;
if (parentControl is Form)
......@@ -288,7 +290,7 @@ namespace HZH_Controls.Forms
{
p = p + deviation.Value;
}
return ShowTips(new Rectangle(p, parentControl.Size), strMsg, location, background, foreColor, fontSize, autoCloseTime);
return ShowTips(new Rectangle(p, parentControl.Size), strMsg, location, background, foreColor, fontSize, autoCloseTime, parentControl.FindForm(),blnTopMost);
}
#endregion
......@@ -303,6 +305,8 @@ namespace HZH_Controls.Forms
/// <param name="foreColor">Color of the fore.</param>
/// <param name="fontSize">Size of the font.</param>
/// <param name="autoCloseTime">The automatic close time.</param>
/// <param name="parentForm">父窗体</param>
/// <param name="blnTopMost">是否置顶</param>
/// <returns>FrmAnchorTips.</returns>
public static FrmAnchorTips ShowTips(
Rectangle rectControl,
......@@ -311,11 +315,13 @@ namespace HZH_Controls.Forms
Color? background = null,
Color? foreColor = null,
int fontSize = 10,
int autoCloseTime = 5000)
int autoCloseTime = 5000,
Form parentForm = null,
bool blnTopMost = true)
{
FrmAnchorTips frm = new FrmAnchorTips(rectControl, strMsg, location, background, foreColor, fontSize, autoCloseTime);
frm.TopMost = true;
frm.Show();
frm.TopMost = blnTopMost;
frm.Show(parentForm);
return frm;
}
#endregion
......
......@@ -21,6 +21,7 @@ using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using HZH_Controls.Controls;
namespace HZH_Controls.Forms
{
......
......@@ -85,6 +85,12 @@
<Compile Include="Controls\ScrollBar\UCHScrollbar.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\Verification\VerificationAttribute.cs" />
<Compile Include="Controls\Verification\VerificationComponent.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\Verification\VerificationEventArgs.cs" />
<Compile Include="Controls\Verification\VerificationModel.cs" />
<Compile Include="Forms\FrmLoading.cs">
<SubType>Form</SubType>
</Compile>
......
......@@ -26,6 +26,7 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
using HZH_Controls.Controls;
namespace HZH_Controls
{
......
......@@ -60,6 +60,7 @@ namespace Test
tnControl.Nodes.Add("图标");
tnControl.Nodes.Add("滚动条");
tnControl.Nodes.Add("控件水印");
tnControl.Nodes.Add("表单验证");
this.tvMenu.Nodes.Add(tnControl);
TreeNode tnCharts = new TreeNode(" 图表");
......@@ -246,6 +247,9 @@ namespace Test
case "控件水印":
AddControl(new UC.UCTestGraphicalOverlay());
break;
case "表单验证":
AddControl(new UC.UCTestVerification() { Dock = DockStyle.Fill });
break;
#endregion
#region 图表 English:Chart
......
......@@ -302,6 +302,12 @@
<Compile Include="UC\UCTestValve.Designer.cs">
<DependentUpon>UCTestValve.cs</DependentUpon>
</Compile>
<Compile Include="UC\UCTestVerification.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UC\UCTestVerification.Designer.cs">
<DependentUpon>UCTestVerification.cs</DependentUpon>
</Compile>
<Compile Include="UC\UCTestWave.cs">
<SubType>UserControl</SubType>
</Compile>
......@@ -449,6 +455,9 @@
<EmbeddedResource Include="UC\UCTestValve.resx">
<DependentUpon>UCTestValve.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UC\UCTestVerification.resx">
<DependentUpon>UCTestVerification.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UC\UCTestWave.resx">
<DependentUpon>UCTestWave.cs</DependentUpon>
</EmbeddedResource>
......
......@@ -21,9 +21,9 @@ namespace Test.UC
private void graphicalOverlay1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.SetGDIHigh();
if (blnColor)
{
e.Graphics.SetGDIHigh();
foreach (Control item in this.Controls)
{
if (item is Button)
......
namespace Test.UC
{
partial class UCTestVerification
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.button1 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.ucTextBoxEx4 = new HZH_Controls.Controls.UCTextBoxEx();
this.ucComboxGrid1 = new HZH_Controls.Controls.UCComboxGrid();
this.ucComboBox2 = new HZH_Controls.Controls.UCCombox();
this.ucComboBox1 = new HZH_Controls.Controls.UCCombox();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.ucTextBoxEx1 = new HZH_Controls.Controls.UCTextBoxEx();
this.ucComboxGrid2 = new HZH_Controls.Controls.UCComboxGrid();
this.ucCombox1 = new HZH_Controls.Controls.UCCombox();
this.ucCombox2 = new HZH_Controls.Controls.UCCombox();
this.comboBox2 = new System.Windows.Forms.ComboBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.textBox10 = new System.Windows.Forms.TextBox();
this.textBox9 = new System.Windows.Forms.TextBox();
this.textBox8 = new System.Windows.Forms.TextBox();
this.textBox7 = new System.Windows.Forms.TextBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.textBox11 = new System.Windows.Forms.TextBox();
this.textBox12 = new System.Windows.Forms.TextBox();
this.textBox13 = new System.Windows.Forms.TextBox();
this.textBox14 = new System.Windows.Forms.TextBox();
this.textBox15 = new System.Windows.Forms.TextBox();
this.textBox16 = new System.Windows.Forms.TextBox();
this.textBox17 = new System.Windows.Forms.TextBox();
this.textBox18 = new System.Windows.Forms.TextBox();
this.panel1 = new System.Windows.Forms.Panel();
this.verificationComponent1 = new HZH_Controls.Controls.VerificationComponent(this.components);
this.graphicalOverlay1 = new HZH_Controls.Controls.GraphicalOverlay(this.components);
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(16, 32);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 1;
this.button1.Text = "验证";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.ucTextBoxEx4);
this.groupBox1.Controls.Add(this.ucComboxGrid1);
this.groupBox1.Controls.Add(this.ucComboBox2);
this.groupBox1.Controls.Add(this.ucComboBox1);
this.groupBox1.Controls.Add(this.comboBox1);
this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Location = new System.Drawing.Point(16, 94);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(210, 319);
this.groupBox1.TabIndex = 3;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "非空验证";
//
// ucTextBoxEx4
//
this.ucTextBoxEx4.BackColor = System.Drawing.Color.Transparent;
this.ucTextBoxEx4.ConerRadius = 5;
this.ucTextBoxEx4.Cursor = System.Windows.Forms.Cursors.IBeam;
this.ucTextBoxEx4.DecLength = 2;
this.ucTextBoxEx4.FillColor = System.Drawing.Color.Empty;
this.ucTextBoxEx4.FocusBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(59)))));
this.ucTextBoxEx4.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.ucTextBoxEx4.InputText = "";
this.ucTextBoxEx4.InputType = HZH_Controls.TextInputType.NotControl;
this.ucTextBoxEx4.IsFocusColor = true;
this.ucTextBoxEx4.IsRadius = true;
this.ucTextBoxEx4.IsShowClearBtn = true;
this.ucTextBoxEx4.IsShowKeyboard = true;
this.ucTextBoxEx4.IsShowRect = true;
this.ucTextBoxEx4.IsShowSearchBtn = false;
this.ucTextBoxEx4.KeyBoardType = HZH_Controls.Controls.KeyBoardType.UCKeyBorderAll_EN;
this.ucTextBoxEx4.Location = new System.Drawing.Point(7, 255);
this.ucTextBoxEx4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.ucTextBoxEx4.MaxValue = new decimal(new int[] {
1000000,
0,
0,
0});
this.ucTextBoxEx4.MinValue = new decimal(new int[] {
1000000,
0,
0,
-2147483648});
this.ucTextBoxEx4.Name = "ucTextBoxEx4";
this.ucTextBoxEx4.Padding = new System.Windows.Forms.Padding(5);
this.ucTextBoxEx4.PromptColor = System.Drawing.Color.Gray;
this.ucTextBoxEx4.PromptFont = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.ucTextBoxEx4.PromptText = "水印文字";
this.ucTextBoxEx4.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
this.ucTextBoxEx4.RectWidth = 1;
this.ucTextBoxEx4.RegexPattern = "";
this.ucTextBoxEx4.Size = new System.Drawing.Size(173, 42);
this.ucTextBoxEx4.TabIndex = 14;
this.verificationComponent1.SetVerificationCustomRegex(this.ucTextBoxEx4, "");
this.verificationComponent1.SetVerificationErrorMsg(this.ucTextBoxEx4, "");
this.verificationComponent1.SetVerificationModel(this.ucTextBoxEx4, HZH_Controls.Controls.VerificationModel.None);
this.verificationComponent1.SetVerificationRequired(this.ucTextBoxEx4, true);
//
// ucComboxGrid1
//
this.ucComboxGrid1.BackColor = System.Drawing.Color.Transparent;
this.ucComboxGrid1.BackColorExt = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.ucComboxGrid1.BoxStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.ucComboxGrid1.ConerRadius = 5;
this.ucComboxGrid1.DropPanelHeight = -1;
this.ucComboxGrid1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.ucComboxGrid1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.ucComboxGrid1.GridColumns = null;
this.ucComboxGrid1.GridDataSource = null;
this.ucComboxGrid1.GridRowType = typeof(HZH_Controls.Controls.UCDataGridViewRow);
this.ucComboxGrid1.IsRadius = false;
this.ucComboxGrid1.IsShowRect = true;
this.ucComboxGrid1.ItemWidth = 70;
this.ucComboxGrid1.Location = new System.Drawing.Point(7, 213);
this.ucComboxGrid1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.ucComboxGrid1.Name = "ucComboxGrid1";
this.ucComboxGrid1.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.ucComboxGrid1.RectWidth = 1;
this.ucComboxGrid1.SelectedIndex = -1;
this.ucComboxGrid1.SelectedValue = "";
this.ucComboxGrid1.SelectSource = null;
this.ucComboxGrid1.Size = new System.Drawing.Size(173, 32);
this.ucComboxGrid1.Source = null;
this.ucComboxGrid1.TabIndex = 13;
this.ucComboxGrid1.TextField = "Name";
this.ucComboxGrid1.TextValue = null;
this.ucComboxGrid1.TriangleColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(59)))));
this.verificationComponent1.SetVerificationCustomRegex(this.ucComboxGrid1, "");
this.verificationComponent1.SetVerificationErrorMsg(this.ucComboxGrid1, "");
this.verificationComponent1.SetVerificationModel(this.ucComboxGrid1, HZH_Controls.Controls.VerificationModel.None);
this.verificationComponent1.SetVerificationRequired(this.ucComboxGrid1, true);
//
// ucComboBox2
//
this.ucComboBox2.BackColor = System.Drawing.Color.Transparent;
this.ucComboBox2.BackColorExt = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.ucComboBox2.BoxStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.ucComboBox2.ConerRadius = 5;
this.ucComboBox2.DropPanelHeight = -1;
this.ucComboBox2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.ucComboBox2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.ucComboBox2.IsRadius = false;
this.ucComboBox2.IsShowRect = true;
this.ucComboBox2.ItemWidth = 70;
this.ucComboBox2.Location = new System.Drawing.Point(7, 159);
this.ucComboBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.ucComboBox2.Name = "ucComboBox2";
this.ucComboBox2.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.ucComboBox2.RectWidth = 1;
this.ucComboBox2.SelectedIndex = -1;
this.ucComboBox2.SelectedValue = "";
this.ucComboBox2.Size = new System.Drawing.Size(173, 32);
this.ucComboBox2.Source = null;
this.ucComboBox2.TabIndex = 11;
this.ucComboBox2.TextValue = null;
this.ucComboBox2.TriangleColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(59)))));
this.verificationComponent1.SetVerificationCustomRegex(this.ucComboBox2, "");
this.verificationComponent1.SetVerificationErrorMsg(this.ucComboBox2, "");
this.verificationComponent1.SetVerificationModel(this.ucComboBox2, HZH_Controls.Controls.VerificationModel.None);
this.verificationComponent1.SetVerificationRequired(this.ucComboBox2, true);
//
// ucComboBox1
//
this.ucComboBox1.BackColor = System.Drawing.Color.Transparent;
this.ucComboBox1.BackColorExt = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.ucComboBox1.BoxStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
this.ucComboBox1.ConerRadius = 5;
this.ucComboBox1.DropPanelHeight = -1;
this.ucComboBox1.FillColor = System.Drawing.Color.White;
this.ucComboBox1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.ucComboBox1.IsRadius = true;
this.ucComboBox1.IsShowRect = true;
this.ucComboBox1.ItemWidth = 70;
this.ucComboBox1.Location = new System.Drawing.Point(7, 105);
this.ucComboBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.ucComboBox1.Name = "ucComboBox1";
this.ucComboBox1.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
this.ucComboBox1.RectWidth = 1;
this.ucComboBox1.SelectedIndex = -1;
this.ucComboBox1.SelectedValue = "";
this.ucComboBox1.Size = new System.Drawing.Size(173, 32);
this.ucComboBox1.Source = null;
this.ucComboBox1.TabIndex = 12;
this.ucComboBox1.TextValue = null;
this.ucComboBox1.TriangleColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(59)))));
this.verificationComponent1.SetVerificationCustomRegex(this.ucComboBox1, "");
this.verificationComponent1.SetVerificationErrorMsg(this.ucComboBox1, "");
this.verificationComponent1.SetVerificationModel(this.ucComboBox1, HZH_Controls.Controls.VerificationModel.None);
this.verificationComponent1.SetVerificationRequired(this.ucComboBox1, true);
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(7, 63);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(121, 20);
this.comboBox1.TabIndex = 4;
this.verificationComponent1.SetVerificationCustomRegex(this.comboBox1, "");
this.verificationComponent1.SetVerificationErrorMsg(this.comboBox1, "");
this.verificationComponent1.SetVerificationModel(this.comboBox1, HZH_Controls.Controls.VerificationModel.None);
this.verificationComponent1.SetVerificationRequired(this.comboBox1, true);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(7, 20);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 21);
this.textBox1.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox1, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox1, "");
this.verificationComponent1.SetVerificationModel(this.textBox1, HZH_Controls.Controls.VerificationModel.None);
this.verificationComponent1.SetVerificationRequired(this.textBox1, true);
//
// groupBox2
//
this.groupBox2.Controls.Add(this.ucTextBoxEx1);
this.groupBox2.Controls.Add(this.ucComboxGrid2);
this.groupBox2.Controls.Add(this.ucCombox1);
this.groupBox2.Controls.Add(this.ucCombox2);
this.groupBox2.Controls.Add(this.comboBox2);
this.groupBox2.Controls.Add(this.textBox2);
this.groupBox2.Location = new System.Drawing.Point(13, 16);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(205, 319);
this.groupBox2.TabIndex = 3;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "扩展验证";
//
// ucTextBoxEx1
//
this.ucTextBoxEx1.BackColor = System.Drawing.Color.Transparent;
this.ucTextBoxEx1.ConerRadius = 5;
this.ucTextBoxEx1.Cursor = System.Windows.Forms.Cursors.IBeam;
this.ucTextBoxEx1.DecLength = 2;
this.ucTextBoxEx1.FillColor = System.Drawing.Color.Empty;
this.ucTextBoxEx1.FocusBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(59)))));
this.ucTextBoxEx1.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.ucTextBoxEx1.InputText = "";
this.ucTextBoxEx1.InputType = HZH_Controls.TextInputType.NotControl;
this.ucTextBoxEx1.IsFocusColor = true;
this.ucTextBoxEx1.IsRadius = true;
this.ucTextBoxEx1.IsShowClearBtn = true;
this.ucTextBoxEx1.IsShowKeyboard = true;
this.ucTextBoxEx1.IsShowRect = true;
this.ucTextBoxEx1.IsShowSearchBtn = false;
this.ucTextBoxEx1.KeyBoardType = HZH_Controls.Controls.KeyBoardType.UCKeyBorderAll_EN;
this.ucTextBoxEx1.Location = new System.Drawing.Point(7, 255);
this.ucTextBoxEx1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.ucTextBoxEx1.MaxValue = new decimal(new int[] {
1000000,
0,
0,
0});
this.ucTextBoxEx1.MinValue = new decimal(new int[] {
1000000,
0,
0,
-2147483648});
this.ucTextBoxEx1.Name = "ucTextBoxEx1";
this.ucTextBoxEx1.Padding = new System.Windows.Forms.Padding(5);
this.ucTextBoxEx1.PromptColor = System.Drawing.Color.Gray;
this.ucTextBoxEx1.PromptFont = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.ucTextBoxEx1.PromptText = "水印文字";
this.ucTextBoxEx1.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
this.ucTextBoxEx1.RectWidth = 1;
this.ucTextBoxEx1.RegexPattern = "";
this.ucTextBoxEx1.Size = new System.Drawing.Size(173, 42);
this.ucTextBoxEx1.TabIndex = 14;
this.verificationComponent1.SetVerificationCustomRegex(this.ucTextBoxEx1, "");
this.verificationComponent1.SetVerificationErrorMsg(this.ucTextBoxEx1, "");
this.verificationComponent1.SetVerificationModel(this.ucTextBoxEx1, HZH_Controls.Controls.VerificationModel.None);
this.verificationComponent1.SetVerificationRequired(this.ucTextBoxEx1, true);
//
// ucComboxGrid2
//
this.ucComboxGrid2.BackColor = System.Drawing.Color.Transparent;
this.ucComboxGrid2.BackColorExt = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.ucComboxGrid2.BoxStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.ucComboxGrid2.ConerRadius = 5;
this.ucComboxGrid2.DropPanelHeight = -1;
this.ucComboxGrid2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.ucComboxGrid2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.ucComboxGrid2.GridColumns = null;
this.ucComboxGrid2.GridDataSource = null;
this.ucComboxGrid2.GridRowType = typeof(HZH_Controls.Controls.UCDataGridViewRow);
this.ucComboxGrid2.IsRadius = false;
this.ucComboxGrid2.IsShowRect = true;
this.ucComboxGrid2.ItemWidth = 70;
this.ucComboxGrid2.Location = new System.Drawing.Point(7, 213);
this.ucComboxGrid2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.ucComboxGrid2.Name = "ucComboxGrid2";
this.ucComboxGrid2.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.ucComboxGrid2.RectWidth = 1;
this.ucComboxGrid2.SelectedIndex = -1;
this.ucComboxGrid2.SelectedValue = "";
this.ucComboxGrid2.SelectSource = null;
this.ucComboxGrid2.Size = new System.Drawing.Size(173, 32);
this.ucComboxGrid2.Source = null;
this.ucComboxGrid2.TabIndex = 13;
this.ucComboxGrid2.TextField = "Name";
this.ucComboxGrid2.TextValue = null;
this.ucComboxGrid2.TriangleColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(59)))));
this.verificationComponent1.SetVerificationCustomRegex(this.ucComboxGrid2, "");
this.verificationComponent1.SetVerificationErrorMsg(this.ucComboxGrid2, "");
this.verificationComponent1.SetVerificationModel(this.ucComboxGrid2, HZH_Controls.Controls.VerificationModel.None);
this.verificationComponent1.SetVerificationRequired(this.ucComboxGrid2, true);
//
// ucCombox1
//
this.ucCombox1.BackColor = System.Drawing.Color.Transparent;
this.ucCombox1.BackColorExt = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.ucCombox1.BoxStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.ucCombox1.ConerRadius = 5;
this.ucCombox1.DropPanelHeight = -1;
this.ucCombox1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.ucCombox1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.ucCombox1.IsRadius = false;
this.ucCombox1.IsShowRect = true;
this.ucCombox1.ItemWidth = 70;
this.ucCombox1.Location = new System.Drawing.Point(7, 159);
this.ucCombox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.ucCombox1.Name = "ucCombox1";
this.ucCombox1.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.ucCombox1.RectWidth = 1;
this.ucCombox1.SelectedIndex = -1;
this.ucCombox1.SelectedValue = "";
this.ucCombox1.Size = new System.Drawing.Size(173, 32);
this.ucCombox1.Source = null;
this.ucCombox1.TabIndex = 11;
this.ucCombox1.TextValue = null;
this.ucCombox1.TriangleColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(59)))));
this.verificationComponent1.SetVerificationCustomRegex(this.ucCombox1, "");
this.verificationComponent1.SetVerificationErrorMsg(this.ucCombox1, "");
this.verificationComponent1.SetVerificationModel(this.ucCombox1, HZH_Controls.Controls.VerificationModel.None);
this.verificationComponent1.SetVerificationRequired(this.ucCombox1, true);
//
// ucCombox2
//
this.ucCombox2.BackColor = System.Drawing.Color.Transparent;
this.ucCombox2.BackColorExt = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.ucCombox2.BoxStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
this.ucCombox2.ConerRadius = 5;
this.ucCombox2.DropPanelHeight = -1;
this.ucCombox2.FillColor = System.Drawing.Color.White;
this.ucCombox2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.ucCombox2.IsRadius = true;
this.ucCombox2.IsShowRect = true;
this.ucCombox2.ItemWidth = 70;
this.ucCombox2.Location = new System.Drawing.Point(7, 105);
this.ucCombox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.ucCombox2.Name = "ucCombox2";
this.ucCombox2.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
this.ucCombox2.RectWidth = 1;
this.ucCombox2.SelectedIndex = -1;
this.ucCombox2.SelectedValue = "";
this.ucCombox2.Size = new System.Drawing.Size(173, 32);
this.ucCombox2.Source = null;
this.ucCombox2.TabIndex = 12;
this.ucCombox2.TextValue = null;
this.ucCombox2.TriangleColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(59)))));
this.verificationComponent1.SetVerificationCustomRegex(this.ucCombox2, "");
this.verificationComponent1.SetVerificationErrorMsg(this.ucCombox2, "");
this.verificationComponent1.SetVerificationModel(this.ucCombox2, HZH_Controls.Controls.VerificationModel.None);
this.verificationComponent1.SetVerificationRequired(this.ucCombox2, true);
//
// comboBox2
//
this.comboBox2.FormattingEnabled = true;
this.comboBox2.Location = new System.Drawing.Point(7, 63);
this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(121, 20);
this.comboBox2.TabIndex = 4;
this.verificationComponent1.SetVerificationCustomRegex(this.comboBox2, "");
this.verificationComponent1.SetVerificationErrorMsg(this.comboBox2, "");
this.verificationComponent1.SetVerificationModel(this.comboBox2, HZH_Controls.Controls.VerificationModel.None);
this.verificationComponent1.SetVerificationRequired(this.comboBox2, true);
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(7, 20);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(100, 21);
this.textBox2.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox2, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox2, "");
this.verificationComponent1.SetVerificationModel(this.textBox2, HZH_Controls.Controls.VerificationModel.None);
this.verificationComponent1.SetVerificationRequired(this.textBox2, true);
//
// groupBox3
//
this.groupBox3.Controls.Add(this.label8);
this.groupBox3.Controls.Add(this.label7);
this.groupBox3.Controls.Add(this.label6);
this.groupBox3.Controls.Add(this.label5);
this.groupBox3.Controls.Add(this.label4);
this.groupBox3.Controls.Add(this.label3);
this.groupBox3.Controls.Add(this.label2);
this.groupBox3.Controls.Add(this.label1);
this.groupBox3.Controls.Add(this.textBox10);
this.groupBox3.Controls.Add(this.textBox9);
this.groupBox3.Controls.Add(this.textBox8);
this.groupBox3.Controls.Add(this.textBox7);
this.groupBox3.Controls.Add(this.textBox6);
this.groupBox3.Controls.Add(this.textBox5);
this.groupBox3.Controls.Add(this.textBox4);
this.groupBox3.Controls.Add(this.textBox3);
this.groupBox3.Location = new System.Drawing.Point(329, 94);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(360, 319);
this.groupBox3.TabIndex = 3;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "其他验证";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(15, 275);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(101, 12);
this.label8.TabIndex = 1;
this.label8.Text = "自定义正则表达式";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(63, 239);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(53, 12);
this.label7.TabIndex = 1;
this.label7.Text = "身份证号";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(99, 203);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(17, 12);
this.label6.TabIndex = 1;
this.label6.Text = "IP";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(87, 167);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(29, 12);
this.label5.TabIndex = 1;
this.label5.Text = "邮箱";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(87, 131);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(29, 12);
this.label4.TabIndex = 1;
this.label4.Text = "正数";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(75, 95);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 1;
this.label3.Text = "非负数";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(63, 59);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 1;
this.label2.Text = "任意数字";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 23);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(113, 12);
this.label1.TabIndex = 1;
this.label1.Text = "任意字母数字下划线";
//
// textBox10
//
this.textBox10.Location = new System.Drawing.Point(134, 272);
this.textBox10.Name = "textBox10";
this.textBox10.Size = new System.Drawing.Size(177, 21);
this.textBox10.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox10, "^\\d+$");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox10, "请输入数字");
this.verificationComponent1.SetVerificationModel(this.textBox10, HZH_Controls.Controls.VerificationModel.Custom);
this.verificationComponent1.SetVerificationRequired(this.textBox10, false);
//
// textBox9
//
this.textBox9.Location = new System.Drawing.Point(134, 236);
this.textBox9.Name = "textBox9";
this.textBox9.Size = new System.Drawing.Size(177, 21);
this.textBox9.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox9, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox9, "");
this.verificationComponent1.SetVerificationModel(this.textBox9, HZH_Controls.Controls.VerificationModel.IDCardNo);
this.verificationComponent1.SetVerificationRequired(this.textBox9, false);
//
// textBox8
//
this.textBox8.Location = new System.Drawing.Point(134, 200);
this.textBox8.Name = "textBox8";
this.textBox8.Size = new System.Drawing.Size(177, 21);
this.textBox8.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox8, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox8, "");
this.verificationComponent1.SetVerificationModel(this.textBox8, HZH_Controls.Controls.VerificationModel.IP);
this.verificationComponent1.SetVerificationRequired(this.textBox8, false);
//
// textBox7
//
this.textBox7.Location = new System.Drawing.Point(134, 164);
this.textBox7.Name = "textBox7";
this.textBox7.Size = new System.Drawing.Size(177, 21);
this.textBox7.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox7, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox7, "");
this.verificationComponent1.SetVerificationModel(this.textBox7, HZH_Controls.Controls.VerificationModel.Email);
this.verificationComponent1.SetVerificationRequired(this.textBox7, false);
//
// textBox6
//
this.textBox6.Location = new System.Drawing.Point(134, 128);
this.textBox6.Name = "textBox6";
this.textBox6.Size = new System.Drawing.Size(177, 21);
this.textBox6.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox6, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox6, "");
this.verificationComponent1.SetVerificationModel(this.textBox6, HZH_Controls.Controls.VerificationModel.PositiveNumber);
this.verificationComponent1.SetVerificationRequired(this.textBox6, false);
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(134, 92);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(177, 21);
this.textBox5.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox5, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox5, "");
this.verificationComponent1.SetVerificationModel(this.textBox5, HZH_Controls.Controls.VerificationModel.UnsignNumber);
this.verificationComponent1.SetVerificationRequired(this.textBox5, false);
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(134, 56);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(177, 21);
this.textBox4.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox4, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox4, "");
this.verificationComponent1.SetVerificationModel(this.textBox4, HZH_Controls.Controls.VerificationModel.Number);
this.verificationComponent1.SetVerificationRequired(this.textBox4, false);
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(134, 20);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(177, 21);
this.textBox3.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox3, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox3, "");
this.verificationComponent1.SetVerificationModel(this.textBox3, HZH_Controls.Controls.VerificationModel.AnyChar);
this.verificationComponent1.SetVerificationRequired(this.textBox3, false);
//
// groupBox4
//
this.groupBox4.Controls.Add(this.label9);
this.groupBox4.Controls.Add(this.label10);
this.groupBox4.Controls.Add(this.label11);
this.groupBox4.Controls.Add(this.label12);
this.groupBox4.Controls.Add(this.label13);
this.groupBox4.Controls.Add(this.label14);
this.groupBox4.Controls.Add(this.label15);
this.groupBox4.Controls.Add(this.label16);
this.groupBox4.Controls.Add(this.textBox11);
this.groupBox4.Controls.Add(this.textBox12);
this.groupBox4.Controls.Add(this.textBox13);
this.groupBox4.Controls.Add(this.textBox14);
this.groupBox4.Controls.Add(this.textBox15);
this.groupBox4.Controls.Add(this.textBox16);
this.groupBox4.Controls.Add(this.textBox17);
this.groupBox4.Controls.Add(this.textBox18);
this.groupBox4.Location = new System.Drawing.Point(326, 16);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(360, 319);
this.groupBox4.TabIndex = 3;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "扩展验证";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(15, 275);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(101, 12);
this.label9.TabIndex = 1;
this.label9.Text = "自定义正则表达式";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(63, 239);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(53, 12);
this.label10.TabIndex = 1;
this.label10.Text = "身份证号";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(99, 203);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(17, 12);
this.label11.TabIndex = 1;
this.label11.Text = "IP";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(87, 167);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(29, 12);
this.label12.TabIndex = 1;
this.label12.Text = "邮箱";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(87, 131);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(29, 12);
this.label13.TabIndex = 1;
this.label13.Text = "正数";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(75, 95);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(41, 12);
this.label14.TabIndex = 1;
this.label14.Text = "非负数";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(63, 59);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(53, 12);
this.label15.TabIndex = 1;
this.label15.Text = "任意数字";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(3, 23);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(113, 12);
this.label16.TabIndex = 1;
this.label16.Text = "任意字母数字下划线";
//
// textBox11
//
this.textBox11.Location = new System.Drawing.Point(134, 272);
this.textBox11.Name = "textBox11";
this.textBox11.Size = new System.Drawing.Size(177, 21);
this.textBox11.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox11, "^\\d+$");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox11, "请输入数字");
this.verificationComponent1.SetVerificationModel(this.textBox11, HZH_Controls.Controls.VerificationModel.Custom);
this.verificationComponent1.SetVerificationRequired(this.textBox11, false);
//
// textBox12
//
this.textBox12.Location = new System.Drawing.Point(134, 236);
this.textBox12.Name = "textBox12";
this.textBox12.Size = new System.Drawing.Size(177, 21);
this.textBox12.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox12, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox12, "");
this.verificationComponent1.SetVerificationModel(this.textBox12, HZH_Controls.Controls.VerificationModel.IDCardNo);
this.verificationComponent1.SetVerificationRequired(this.textBox12, false);
//
// textBox13
//
this.textBox13.Location = new System.Drawing.Point(134, 200);
this.textBox13.Name = "textBox13";
this.textBox13.Size = new System.Drawing.Size(177, 21);
this.textBox13.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox13, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox13, "");
this.verificationComponent1.SetVerificationModel(this.textBox13, HZH_Controls.Controls.VerificationModel.IP);
this.verificationComponent1.SetVerificationRequired(this.textBox13, false);
//
// textBox14
//
this.textBox14.Location = new System.Drawing.Point(134, 164);
this.textBox14.Name = "textBox14";
this.textBox14.Size = new System.Drawing.Size(177, 21);
this.textBox14.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox14, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox14, "");
this.verificationComponent1.SetVerificationModel(this.textBox14, HZH_Controls.Controls.VerificationModel.Email);
this.verificationComponent1.SetVerificationRequired(this.textBox14, false);
//
// textBox15
//
this.textBox15.Location = new System.Drawing.Point(134, 128);
this.textBox15.Name = "textBox15";
this.textBox15.Size = new System.Drawing.Size(177, 21);
this.textBox15.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox15, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox15, "");
this.verificationComponent1.SetVerificationModel(this.textBox15, HZH_Controls.Controls.VerificationModel.PositiveNumber);
this.verificationComponent1.SetVerificationRequired(this.textBox15, false);
//
// textBox16
//
this.textBox16.Location = new System.Drawing.Point(134, 92);
this.textBox16.Name = "textBox16";
this.textBox16.Size = new System.Drawing.Size(177, 21);
this.textBox16.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox16, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox16, "");
this.verificationComponent1.SetVerificationModel(this.textBox16, HZH_Controls.Controls.VerificationModel.UnsignNumber);
this.verificationComponent1.SetVerificationRequired(this.textBox16, false);
//
// textBox17
//
this.textBox17.Location = new System.Drawing.Point(134, 56);
this.textBox17.Name = "textBox17";
this.textBox17.Size = new System.Drawing.Size(177, 21);
this.textBox17.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox17, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox17, "");
this.verificationComponent1.SetVerificationModel(this.textBox17, HZH_Controls.Controls.VerificationModel.Number);
this.verificationComponent1.SetVerificationRequired(this.textBox17, false);
//
// textBox18
//
this.textBox18.Location = new System.Drawing.Point(134, 20);
this.textBox18.Name = "textBox18";
this.textBox18.Size = new System.Drawing.Size(177, 21);
this.textBox18.TabIndex = 0;
this.verificationComponent1.SetVerificationCustomRegex(this.textBox18, "");
this.verificationComponent1.SetVerificationErrorMsg(this.textBox18, "");
this.verificationComponent1.SetVerificationModel(this.textBox18, HZH_Controls.Controls.VerificationModel.AnyChar);
this.verificationComponent1.SetVerificationRequired(this.textBox18, false);
//
// panel1
//
this.panel1.Controls.Add(this.groupBox2);
this.panel1.Controls.Add(this.groupBox4);
this.panel1.Location = new System.Drawing.Point(3, 420);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(697, 347);
this.panel1.TabIndex = 4;
//
// verificationComponent1
//
this.verificationComponent1.ErrorTipsBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(77)))), ((int)(((byte)(58)))));
this.verificationComponent1.ErrorTipsForeColor = System.Drawing.Color.White;
this.verificationComponent1.Verificationed += new HZH_Controls.Controls.VerificationComponent.VerificationedHandle(this.verificationComponent1_Verificationed);
//
// graphicalOverlay1
//
this.graphicalOverlay1.Owner = this.panel1;
this.graphicalOverlay1.Paint += new System.EventHandler<System.Windows.Forms.PaintEventArgs>(this.graphicalOverlay1_Paint);
//
// UCTestVerification
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.panel1);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.button1);
this.Name = "UCTestVerification";
this.Size = new System.Drawing.Size(1025, 767);
this.Load += new System.EventHandler(this.UCTestVerification_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
private HZH_Controls.Controls.VerificationComponent verificationComponent1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ComboBox comboBox1;
private HZH_Controls.Controls.UCComboxGrid ucComboxGrid1;
private HZH_Controls.Controls.UCCombox ucComboBox2;
private HZH_Controls.Controls.UCCombox ucComboBox1;
private HZH_Controls.Controls.UCTextBoxEx ucTextBoxEx4;
private System.Windows.Forms.GroupBox groupBox2;
private HZH_Controls.Controls.UCTextBoxEx ucTextBoxEx1;
private HZH_Controls.Controls.UCComboxGrid ucComboxGrid2;
private HZH_Controls.Controls.UCCombox ucCombox1;
private HZH_Controls.Controls.UCCombox ucCombox2;
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.TextBox textBox2;
private HZH_Controls.Controls.GraphicalOverlay graphicalOverlay1;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox textBox7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox textBox8;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox textBox9;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox textBox10;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.TextBox textBox11;
private System.Windows.Forms.TextBox textBox12;
private System.Windows.Forms.TextBox textBox13;
private System.Windows.Forms.TextBox textBox14;
private System.Windows.Forms.TextBox textBox15;
private System.Windows.Forms.TextBox textBox16;
private System.Windows.Forms.TextBox textBox17;
private System.Windows.Forms.TextBox textBox18;
private System.Windows.Forms.Panel panel1;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using HZH_Controls.Controls;
using HZH_Controls;
using System.Drawing.Drawing2D;
namespace Test.UC
{
public partial class UCTestVerification : UserControl
{
public UCTestVerification()
{
InitializeComponent();
}
List<Control> lstErrorControl = new List<Control>();
private void button1_Click(object sender, EventArgs e)
{
lstErrorControl.Clear();
this.verificationComponent1.Verification();
this.panel1.Invalidate(true);
}
private void UCTestVerification_Load(object sender, EventArgs e)
{
List<KeyValuePair<string, string>> lstCom = new List<KeyValuePair<string, string>>();
for (int i = 0; i < 5; i++)
{
lstCom.Add(new KeyValuePair<string, string>(i.ToString(), "选项" + i));
}
this.ucComboBox1.Source = lstCom;
this.ucComboBox2.Source = lstCom;
this.ucCombox2.Source = lstCom;
this.ucCombox1.Source = lstCom;
List<DataGridViewColumnEntity> lstCulumns = new List<DataGridViewColumnEntity>();
lstCulumns.Add(new DataGridViewColumnEntity() { DataField = "ID", HeadText = "编号", Width = 70, WidthType = SizeType.Absolute });
lstCulumns.Add(new DataGridViewColumnEntity() { DataField = "Name", HeadText = "姓名", Width = 100, WidthType = SizeType.Absolute });
lstCulumns.Add(new DataGridViewColumnEntity() { DataField = "Age", HeadText = "年龄", Width = 100, WidthType = SizeType.Absolute });
lstCulumns.Add(new DataGridViewColumnEntity() { DataField = "Birthday", HeadText = "生日", Width = 120, WidthType = SizeType.Absolute, Format = (a) => { return ((DateTime)a).ToString("yyyy-MM-dd"); } });
lstCulumns.Add(new DataGridViewColumnEntity() { DataField = "Sex", HeadText = "性别", Width = 100, WidthType = SizeType.Absolute, Format = (a) => { return ((int)a) == 0 ? "女" : "男"; } });
this.ucComboxGrid1.GridColumns = lstCulumns;
List<object> lstSourceGrid = new List<object>();
for (int i = 0; i < 100; i++)
{
TestGridModel model = new TestGridModel()
{
ID = i.ToString(),
Age = 3 * i,
Name = "姓名——" + i,
Birthday = DateTime.Now.AddYears(-10),
Sex = i % 2
};
lstSourceGrid.Add(model);
}
this.ucComboxGrid1.GridDataSource = lstSourceGrid;
ucComboxGrid2.GridDataSource = lstSourceGrid;
}
private void graphicalOverlay1_Paint(object sender, PaintEventArgs e)
{
if (lstErrorControl.Count > 0)
{
e.Graphics.SetGDIHigh();
foreach (Control control in lstErrorControl)
{
if (control.Parent == this.groupBox2 || control.Parent == this.groupBox4)
{
var p = control.Location;
p.Offset(control.Parent.Location);
GraphicsPath path = ControlHelper.CreateRoundedRectanglePath(new Rectangle(p.X - 1, p.Y - 1, control.Width + 2, control.Height + 2), 4);
e.Graphics.DrawPath(new Pen(new SolidBrush(Color.FromArgb(100, 255, 0, 0)), 2), path);
}
}
}
}
private void verificationComponent1_Verificationed(VerificationEventArgs e)
{
if (!e.IsVerifySuccess)
{
lstErrorControl.Add(e.VerificationControl);
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="verificationComponent1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="graphicalOverlay1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>212, 17</value>
</metadata>
</root>
\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!