-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
RegexForm.cs
206 lines (197 loc) · 9.2 KB
/
RegexForm.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
/* RDBEd - Retro RDB & DAT Editor
* Copyright (C) 2020-2023 - Bernhard Schelling
*
* RDBEd is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RDBEd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RDBEd.
* If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Drawing;
using System.Windows.Forms;
namespace RDBEd
{
public class RegexForm : Form
{
public RegexForm()
{
InitializeComponent();
this.Icon = System.Drawing.Icon.ExtractAssociatedIcon(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName);
}
public TextBox txtRegex;
public ComboBox cmbField;
public Button btnCancel;
public Button btnOK;
public Label outLabel;
private Label label2;
public ComboBox cmbPreset;
private Label label1;
public CheckBox chkNegate;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label2 = new System.Windows.Forms.Label();
this.txtRegex = new System.Windows.Forms.TextBox();
this.outLabel = new System.Windows.Forms.Label();
this.cmbField = new System.Windows.Forms.ComboBox();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.cmbPreset = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.chkNegate = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(5, 36);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(32, 13);
this.label2.TabIndex = 0;
this.label2.Text = "Field:";
//
// txtRegex
//
this.txtRegex.AcceptsReturn = true;
this.txtRegex.AcceptsTab = true;
this.txtRegex.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtRegex.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtRegex.Location = new System.Drawing.Point(72, 59);
this.txtRegex.Multiline = true;
this.txtRegex.Name = "txtRegex";
this.txtRegex.Size = new System.Drawing.Size(815, 190);
this.txtRegex.TabIndex = 3;
this.txtRegex.WordWrap = false;
//
// outLabel
//
this.outLabel.AutoSize = true;
this.outLabel.Location = new System.Drawing.Point(5, 62);
this.outLabel.Name = "outLabel";
this.outLabel.Size = new System.Drawing.Size(61, 26);
this.outLabel.TabIndex = 0;
this.outLabel.Text = "Regular\r\nExpression:";
//
// cmbField
//
this.cmbField.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cmbField.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbField.FormattingEnabled = true;
this.cmbField.Location = new System.Drawing.Point(72, 32);
this.cmbField.Name = "cmbField";
this.cmbField.Size = new System.Drawing.Size(815, 21);
this.cmbField.TabIndex = 2;
this.cmbField.ValueMember = "ColId";
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(812, 255);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 5;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
//
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOK.Location = new System.Drawing.Point(731, 255);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(75, 23);
this.btnOK.TabIndex = 4;
this.btnOK.Text = "OK";
this.btnOK.UseVisualStyleBackColor = true;
//
// cmbPreset
//
this.cmbPreset.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cmbPreset.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbPreset.FormattingEnabled = true;
this.cmbPreset.Location = new System.Drawing.Point(72, 5);
this.cmbPreset.Name = "cmbPreset";
this.cmbPreset.Size = new System.Drawing.Size(815, 21);
this.cmbPreset.TabIndex = 1;
this.cmbPreset.ValueMember = "ColId";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(5, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(40, 13);
this.label1.TabIndex = 12;
this.label1.Text = "Preset:";
//
// chkNegate
//
this.chkNegate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.chkNegate.AutoSize = true;
this.chkNegate.Location = new System.Drawing.Point(631, 259);
this.chkNegate.Name = "chkNegate";
this.chkNegate.Size = new System.Drawing.Size(94, 17);
this.chkNegate.TabIndex = 14;
this.chkNegate.Text = "Negate Match";
this.chkNegate.UseVisualStyleBackColor = true;
//
// RegexForm
//
this.AcceptButton = this.btnOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(892, 286);
this.Controls.Add(this.chkNegate);
this.Controls.Add(this.cmbPreset);
this.Controls.Add(this.label1);
this.Controls.Add(this.outLabel);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.cmbField);
this.Controls.Add(this.txtRegex);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.label2);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(180, 160);
this.Name = "RegexForm";
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Validate Field";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
}
}