TxtTextBox.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. 
  2. using System.ComponentModel;
  3. using System.Drawing;
  4. using System.Windows.Forms;
  5. namespace Dongke.WinForm.Controls
  6. {
  7. /// <summary>
  8. /// 文本框控件
  9. /// </summary>
  10. [ToolboxBitmap(typeof(TextBox))]
  11. public class TxtTextBox : TextBoxRejected, IDKControl
  12. {
  13. #region 构造函数
  14. /// <summary>
  15. /// 文本框控件
  16. /// </summary>
  17. public TxtTextBox()
  18. {
  19. }
  20. #endregion
  21. #region 属性
  22. /// <summary>
  23. /// 获取或设置限制输入的字符。
  24. /// </summary>
  25. [Description("获取或设置限制输入的字符。"), Category("CustomerEx")]
  26. [DefaultValue((string)null)]
  27. public virtual string RejectedChars
  28. {
  29. get
  30. {
  31. return this.Rejected;
  32. }
  33. set
  34. {
  35. this.Rejected = value;
  36. }
  37. }
  38. /// <summary>
  39. /// 获取或设置输入内容应该符合的正则表达式。
  40. /// </summary>
  41. [Description("获取或设置输入内容应该符合的正则表达式。"), Category("CustomerEx")]
  42. [DefaultValue((string)null)]
  43. public virtual string RegularExpression
  44. {
  45. get
  46. {
  47. return this.Regular;
  48. }
  49. set
  50. {
  51. this.Regular = value;
  52. }
  53. }
  54. #endregion
  55. }
  56. }