TxtPhone.cs 516 B

123456789101112131415161718192021222324
  1. 
  2. using System.Drawing;
  3. using System.Windows.Forms;
  4. namespace Dongke.WinForm.Controls
  5. {
  6. /// <summary>
  7. /// 电话输入文本框
  8. /// </summary>
  9. [ToolboxBitmap(typeof(TextBox))]
  10. public class TxtPhone : TextBoxCodeBase
  11. {
  12. #region 构造函数
  13. /// <summary>
  14. /// 电话输入文本框
  15. /// </summary>
  16. public TxtPhone()
  17. {
  18. this.Rejected = "[^0-9 \\-()]";
  19. //this.Regular = @"^[1-9]\d{5}$";
  20. }
  21. #endregion
  22. }
  23. }