RegexEditorDialog.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /**
  2. * Namespace: System.Web.UI.Design.WebControls
  3. * Class: RegexEditorDialog
  4. *
  5. * Author: Gaurav Vaish
  6. * Maintainer: mastergaurav AT users DOT sf DOT net
  7. *
  8. * (C) Gaurav Vaish (2002)
  9. */
  10. using System;
  11. using System.Drawing;
  12. using System.ComponentModel;
  13. using System.Windows.Forms;
  14. using System.Windows.Forms.Design;
  15. namespace System.Web.UI.Design.WebControls
  16. {
  17. public class RegexEditorDialog : Form
  18. {
  19. private ISite site;
  20. private Container components;
  21. private bool isActivated;
  22. private bool sVal;
  23. private string regularExpression = String.Empty;
  24. private Button helpBtn;
  25. private Button testValBtn;
  26. private Button okBtn;
  27. private Button cancelBtn;
  28. private Label inputLabel;
  29. private Label testResultsLabel;
  30. private Label stdExprLabel;
  31. private Label exprLabel;
  32. private ListBox stdExprsList;
  33. private TextBox exprText;
  34. private TextBox sampleText;
  35. private GroupBox exprGrp;
  36. public RegexEditorDialog(ISite site) : base()
  37. {
  38. this.site = site;
  39. this.isActivated = false;
  40. this.sVal = false;
  41. InitializeComponents();
  42. }
  43. [MonoTODO]
  44. private void InitializeComponents()
  45. {
  46. components = new Container();
  47. helpBtn = new Button();
  48. testValBtn = new Button();
  49. okBtn = new Button();
  50. cancelBtn = new Button();
  51. inputLabel = new Label();
  52. testResultsLabel = new Label();
  53. stdExprLabel = new Label();
  54. exprLabel = new Label();
  55. stdExprsList = new ListBox();
  56. exprText = new TextBox();
  57. sampleText = new TextBox();
  58. exprGrp = new GroupBox();
  59. System.Drawing.Font cFont = System.Windows.Forms.Control.DefaultFont;
  60. IUIService service = (IUIService)site.GetService(typeof(IUIService));
  61. if(service != null)
  62. {
  63. cFont = (Font)(service.Styles["DialogFont"]);
  64. }
  65. throw new NotImplementedException();
  66. }
  67. public string RegularExpression
  68. {
  69. get
  70. {
  71. return regularExpression;
  72. }
  73. set
  74. {
  75. regularExpression = value;
  76. }
  77. }
  78. protected override void Dispose(bool disposing)
  79. {
  80. if(disposing)
  81. {
  82. components.Dispose();
  83. }
  84. base.Dispose(disposing);
  85. }
  86. [MonoTODO]
  87. private object[] CannedExpressions
  88. {
  89. get
  90. {
  91. throw new NotImplementedException();
  92. }
  93. }
  94. private class CannedExpression
  95. {
  96. public string Description;
  97. public string Expression;
  98. public CannedExpression(string description, string expression)
  99. {
  100. Description = description;
  101. Expression = expression;
  102. }
  103. public override string ToString()
  104. {
  105. return Description;
  106. }
  107. }
  108. }
  109. }