From ae0603fb4d0314c024502856715f01c0d0a12d63 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Tue, 12 Jan 2021 15:26:48 +0100 Subject: [PATCH] RegexEditor: Update with devexpress form --- Controls.RegexEditor/RegexEditor.vbproj | 24 +-- .../frmRegexEditor.Designer.vb | 143 +++++++++--------- Controls.RegexEditor/frmRegexEditor.vb | 2 +- 3 files changed, 87 insertions(+), 82 deletions(-) diff --git a/Controls.RegexEditor/RegexEditor.vbproj b/Controls.RegexEditor/RegexEditor.vbproj index 5da54aa2..fa2a26ed 100644 --- a/Controls.RegexEditor/RegexEditor.vbproj +++ b/Controls.RegexEditor/RegexEditor.vbproj @@ -48,6 +48,11 @@ On + + + + + @@ -73,13 +78,6 @@ - - Form - - - frmRegexEditor.vb - Form - True @@ -96,17 +94,23 @@ True + + frmRegexEditor.vb + + + Form + - - frmRegexEditor.vb - VbMyResourcesResXFileCodeGenerator Resources.Designer.vb My.Resources Designer + + frmRegexEditor.vb + diff --git a/Controls.RegexEditor/frmRegexEditor.Designer.vb b/Controls.RegexEditor/frmRegexEditor.Designer.vb index f44562a3..1e629ce4 100644 --- a/Controls.RegexEditor/frmRegexEditor.Designer.vb +++ b/Controls.RegexEditor/frmRegexEditor.Designer.vb @@ -1,70 +1,63 @@  _ Partial Class frmRegexEditor - Inherits System.Windows.Forms.Form + Inherits DevExpress.XtraEditors.XtraForm - 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + 'Form overrides dispose to clean up the component list. _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - Finally - MyBase.Dispose(disposing) - End Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + MyBase.Dispose(disposing) End Sub - 'Wird vom Windows Form-Designer benötigt. + 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer - 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. - 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. - 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - Me.txtRegex = New System.Windows.Forms.TextBox() - Me.Label1 = New System.Windows.Forms.Label() - Me.Label4 = New System.Windows.Forms.Label() + Me.btnTest = New System.Windows.Forms.Button() + Me.btnSave = New System.Windows.Forms.Button() Me.labelResult = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.txtTest = New System.Windows.Forms.TextBox() - Me.btnTest = New System.Windows.Forms.Button() - Me.btnSave = New System.Windows.Forms.Button() + Me.Label4 = New System.Windows.Forms.Label() + Me.Label1 = New System.Windows.Forms.Label() + Me.txtRegex = New System.Windows.Forms.TextBox() Me.SuspendLayout() ' - 'txtRegex - ' - Me.txtRegex.Location = New System.Drawing.Point(12, 25) - Me.txtRegex.Name = "txtRegex" - Me.txtRegex.Size = New System.Drawing.Size(419, 20) - Me.txtRegex.TabIndex = 0 - ' - 'Label1 + 'btnTest ' - Me.Label1.AutoSize = True - Me.Label1.Location = New System.Drawing.Point(12, 9) - Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(101, 13) - Me.Label1.TabIndex = 2 - Me.Label1.Text = "Regular Expression:" + Me.btnTest.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnTest.Location = New System.Drawing.Point(187, 192) + Me.btnTest.Name = "btnTest" + Me.btnTest.Size = New System.Drawing.Size(112, 31) + Me.btnTest.TabIndex = 23 + Me.btnTest.Text = "Test" + Me.btnTest.UseVisualStyleBackColor = True ' - 'Label4 + 'btnSave ' - Me.Label4.Location = New System.Drawing.Point(12, 48) - Me.Label4.Name = "Label4" - Me.Label4.Size = New System.Drawing.Size(419, 33) - Me.Label4.TabIndex = 8 - Me.Label4.Text = "Wenn die Eingabe insgesamt validiert werden soll, muss der Regex in ^ und $ einge" & - "schlossen sein" + Me.btnSave.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK + Me.btnSave.Location = New System.Drawing.Point(305, 192) + Me.btnSave.Name = "btnSave" + Me.btnSave.Size = New System.Drawing.Size(112, 31) + Me.btnSave.TabIndex = 22 + Me.btnSave.Text = "Speichern" + Me.btnSave.UseVisualStyleBackColor = True ' 'labelResult ' Me.labelResult.AutoSize = True Me.labelResult.Location = New System.Drawing.Point(12, 163) Me.labelResult.Name = "labelResult" - Me.labelResult.Size = New System.Drawing.Size(282, 13) - Me.labelResult.TabIndex = 12 + Me.labelResult.Size = New System.Drawing.Size(284, 13) + Me.labelResult.TabIndex = 21 Me.labelResult.Text = "Klicken Sie auf Test, um die Regular Expression zu testen." ' 'Label3 @@ -72,8 +65,8 @@ Partial Class frmRegexEditor Me.Label3.AutoSize = True Me.Label3.Location = New System.Drawing.Point(12, 150) Me.Label3.Name = "Label3" - Me.Label3.Size = New System.Drawing.Size(51, 13) - Me.Label3.TabIndex = 11 + Me.Label3.Size = New System.Drawing.Size(52, 13) + Me.Label3.TabIndex = 20 Me.Label3.Text = "Ergebnis:" ' 'Label2 @@ -81,45 +74,53 @@ Partial Class frmRegexEditor Me.Label2.AutoSize = True Me.Label2.Location = New System.Drawing.Point(12, 100) Me.Label2.Name = "Label2" - Me.Label2.Size = New System.Drawing.Size(61, 13) - Me.Label2.TabIndex = 10 + Me.Label2.Size = New System.Drawing.Size(63, 13) + Me.Label2.TabIndex = 19 Me.Label2.Text = "Test String:" ' 'txtTest ' Me.txtTest.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtTest.Font = New System.Drawing.Font("Consolas", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtTest.Location = New System.Drawing.Point(12, 116) Me.txtTest.Name = "txtTest" - Me.txtTest.Size = New System.Drawing.Size(419, 20) - Me.txtTest.TabIndex = 9 + Me.txtTest.Size = New System.Drawing.Size(405, 20) + Me.txtTest.TabIndex = 18 ' - 'btnTest + 'Label4 ' - Me.btnTest.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.btnTest.Location = New System.Drawing.Point(201, 193) - Me.btnTest.Name = "btnTest" - Me.btnTest.Size = New System.Drawing.Size(112, 31) - Me.btnTest.TabIndex = 14 - Me.btnTest.Text = "Test" - Me.btnTest.UseVisualStyleBackColor = True + Me.Label4.Location = New System.Drawing.Point(12, 48) + Me.Label4.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(419, 33) + Me.Label4.TabIndex = 17 + Me.Label4.Text = "Wenn die Eingabe insgesamt validiert werden soll, muss der Regex in ^ und $ einge" & + "schlossen sein" ' - 'btnSave + 'Label1 ' - Me.btnSave.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK - Me.btnSave.Location = New System.Drawing.Point(319, 193) - Me.btnSave.Name = "btnSave" - Me.btnSave.Size = New System.Drawing.Size(112, 31) - Me.btnSave.TabIndex = 13 - Me.btnSave.Text = "Speichern" - Me.btnSave.UseVisualStyleBackColor = True + Me.Label1.AutoSize = True + Me.Label1.Location = New System.Drawing.Point(12, 9) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(103, 13) + Me.Label1.TabIndex = 16 + Me.Label1.Text = "Regular Expression:" + ' + 'txtRegex + ' + Me.txtRegex.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.txtRegex.Font = New System.Drawing.Font("Consolas", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtRegex.Location = New System.Drawing.Point(12, 25) + Me.txtRegex.Name = "txtRegex" + Me.txtRegex.Size = New System.Drawing.Size(405, 20) + Me.txtRegex.TabIndex = 15 ' 'frmRegexEditor ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(443, 236) + Me.ClientSize = New System.Drawing.Size(429, 235) Me.Controls.Add(Me.btnTest) Me.Controls.Add(Me.btnSave) Me.Controls.Add(Me.labelResult) @@ -129,21 +130,21 @@ Partial Class frmRegexEditor Me.Controls.Add(Me.Label4) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.txtRegex) + Me.IconOptions.ShowIcon = False Me.Name = "frmRegexEditor" - Me.ShowIcon = False Me.Text = "Regex Editor" Me.ResumeLayout(False) Me.PerformLayout() End Sub - Friend WithEvents txtRegex As TextBox - Friend WithEvents Label1 As Label - Friend WithEvents Label4 As Label + Friend WithEvents btnTest As Button + Friend WithEvents btnSave As Button Friend WithEvents labelResult As Label Friend WithEvents Label3 As Label Friend WithEvents Label2 As Label Friend WithEvents txtTest As TextBox - Friend WithEvents btnTest As Button - Friend WithEvents btnSave As Button + Friend WithEvents Label4 As Label + Friend WithEvents Label1 As Label + Friend WithEvents txtRegex As TextBox End Class diff --git a/Controls.RegexEditor/frmRegexEditor.vb b/Controls.RegexEditor/frmRegexEditor.vb index dfc1b0e8..761ac9a9 100644 --- a/Controls.RegexEditor/frmRegexEditor.vb +++ b/Controls.RegexEditor/frmRegexEditor.vb @@ -32,4 +32,4 @@ Public Class frmRegexEditor Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click RegexString = txtRegex.Text End Sub -End Class +End Class \ No newline at end of file