From 5e45aef7ff8b48ec2865a9b44d901124076057c3 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 19 Apr 2021 14:03:33 +0200 Subject: [PATCH] RegexEditor: Improve Look and Feel --- .../My Project/AssemblyInfo.vb | 6 +- .../My Project/Resources.Designer.vb | 62 +++++- .../My Project/Resources.resx | 32 +++- Controls.RegexEditor/My Project/licenses.licx | 3 + Controls.RegexEditor/RegexEditor.vbproj | 41 +++- Controls.RegexEditor/Resources/about.svg | 19 ++ .../Resources/actions_check.svg | 15 ++ .../Resources/actions_check1.svg | 15 ++ .../Resources/definednameuseinformula.svg | 9 + .../Resources/definednameuseinformula1.svg | 9 + .../Resources/definednameuseinformula2.svg | 9 + .../frmRegexEditor.Designer.vb | 176 +++++++++++------- Controls.RegexEditor/frmRegexEditor.vb | 17 +- 13 files changed, 326 insertions(+), 87 deletions(-) create mode 100644 Controls.RegexEditor/My Project/licenses.licx create mode 100644 Controls.RegexEditor/Resources/about.svg create mode 100644 Controls.RegexEditor/Resources/actions_check.svg create mode 100644 Controls.RegexEditor/Resources/actions_check1.svg create mode 100644 Controls.RegexEditor/Resources/definednameuseinformula.svg create mode 100644 Controls.RegexEditor/Resources/definednameuseinformula1.svg create mode 100644 Controls.RegexEditor/Resources/definednameuseinformula2.svg diff --git a/Controls.RegexEditor/My Project/AssemblyInfo.vb b/Controls.RegexEditor/My Project/AssemblyInfo.vb index bc8b0f65..e26b97d7 100644 --- a/Controls.RegexEditor/My Project/AssemblyInfo.vb +++ b/Controls.RegexEditor/My Project/AssemblyInfo.vb @@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices - + @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/Controls.RegexEditor/My Project/Resources.Designer.vb b/Controls.RegexEditor/My Project/Resources.Designer.vb index 6aabab17..3229c33d 100644 --- a/Controls.RegexEditor/My Project/Resources.Designer.vb +++ b/Controls.RegexEditor/My Project/Resources.Designer.vb @@ -22,7 +22,7 @@ Namespace My.Resources ''' ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. ''' - _ @@ -59,5 +59,65 @@ Namespace My.Resources resourceCulture = value End Set End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property about() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("about", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property actions_check() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("actions_check", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property actions_check1() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("actions_check1", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property definednameuseinformula() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("definednameuseinformula", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property definednameuseinformula1() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("definednameuseinformula1", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property definednameuseinformula2() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("definednameuseinformula2", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property End Module End Namespace diff --git a/Controls.RegexEditor/My Project/Resources.resx b/Controls.RegexEditor/My Project/Resources.resx index af7dbebb..9f345215 100644 --- a/Controls.RegexEditor/My Project/Resources.resx +++ b/Controls.RegexEditor/My Project/Resources.resx @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : and then encoded with base64 encoding. --> + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,28 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\definednameuseinformula.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\definednameuseinformula1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\actions_check.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\actions_check1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\definednameuseinformula2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\about.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + \ No newline at end of file diff --git a/Controls.RegexEditor/My Project/licenses.licx b/Controls.RegexEditor/My Project/licenses.licx new file mode 100644 index 00000000..4145358b --- /dev/null +++ b/Controls.RegexEditor/My Project/licenses.licx @@ -0,0 +1,3 @@ +DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/Controls.RegexEditor/RegexEditor.vbproj b/Controls.RegexEditor/RegexEditor.vbproj index fa2a26ed..bfcd372a 100644 --- a/Controls.RegexEditor/RegexEditor.vbproj +++ b/Controls.RegexEditor/RegexEditor.vbproj @@ -48,21 +48,33 @@ On - - - - - + + + + + + False + D:\ProgramFiles\DevExpress 19.2\Components\Bin\Framework\DevExpress.XtraEditors.v19.2.dll + + + False + D:\ProgramFiles\DevExpress 19.2\Components\Bin\Framework\DevExpress.XtraLayout.v19.2.dll + + + + + + @@ -102,6 +114,7 @@ + VbMyResourcesResXFileCodeGenerator Resources.Designer.vb @@ -130,5 +143,23 @@ Language + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Controls.RegexEditor/Resources/about.svg b/Controls.RegexEditor/Resources/about.svg new file mode 100644 index 00000000..1f67213d --- /dev/null +++ b/Controls.RegexEditor/Resources/about.svg @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/Controls.RegexEditor/Resources/actions_check.svg b/Controls.RegexEditor/Resources/actions_check.svg new file mode 100644 index 00000000..35c68028 --- /dev/null +++ b/Controls.RegexEditor/Resources/actions_check.svg @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/Controls.RegexEditor/Resources/actions_check1.svg b/Controls.RegexEditor/Resources/actions_check1.svg new file mode 100644 index 00000000..35c68028 --- /dev/null +++ b/Controls.RegexEditor/Resources/actions_check1.svg @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/Controls.RegexEditor/Resources/definednameuseinformula.svg b/Controls.RegexEditor/Resources/definednameuseinformula.svg new file mode 100644 index 00000000..0d27a20b --- /dev/null +++ b/Controls.RegexEditor/Resources/definednameuseinformula.svg @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/Controls.RegexEditor/Resources/definednameuseinformula1.svg b/Controls.RegexEditor/Resources/definednameuseinformula1.svg new file mode 100644 index 00000000..0d27a20b --- /dev/null +++ b/Controls.RegexEditor/Resources/definednameuseinformula1.svg @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/Controls.RegexEditor/Resources/definednameuseinformula2.svg b/Controls.RegexEditor/Resources/definednameuseinformula2.svg new file mode 100644 index 00000000..0d27a20b --- /dev/null +++ b/Controls.RegexEditor/Resources/definednameuseinformula2.svg @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/Controls.RegexEditor/frmRegexEditor.Designer.vb b/Controls.RegexEditor/frmRegexEditor.Designer.vb index 1e629ce4..a6d6ac0a 100644 --- a/Controls.RegexEditor/frmRegexEditor.Designer.vb +++ b/Controls.RegexEditor/frmRegexEditor.Designer.vb @@ -1,6 +1,6 @@  _ Partial Class frmRegexEditor - Inherits DevExpress.XtraEditors.XtraForm + Inherits DevExpress.XtraBars.Ribbon.RibbonForm 'Form overrides dispose to clean up the component list. _ @@ -19,62 +19,29 @@ Partial Class frmRegexEditor 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - 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.Label4 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.txtRegex = New System.Windows.Forms.TextBox() + Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() + Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem() + Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem() + Me.BarStaticItem1 = New DevExpress.XtraBars.BarStaticItem() + Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() + Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() + Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() + Me.labelResult = New DevExpress.XtraBars.BarStaticItem() + CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' - 'btnTest - ' - 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 - ' - 'btnSave - ' - 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(284, 13) - Me.labelResult.TabIndex = 21 - Me.labelResult.Text = "Klicken Sie auf Test, um die Regular Expression zu testen." - ' - 'Label3 - ' - Me.Label3.AutoSize = True - Me.Label3.Location = New System.Drawing.Point(12, 150) - Me.Label3.Name = "Label3" - Me.Label3.Size = New System.Drawing.Size(52, 13) - Me.Label3.TabIndex = 20 - Me.Label3.Text = "Ergebnis:" - ' 'Label2 ' Me.Label2.AutoSize = True - Me.Label2.Location = New System.Drawing.Point(12, 100) + Me.Label2.Location = New System.Drawing.Point(12, 151) Me.Label2.Name = "Label2" - Me.Label2.Size = New System.Drawing.Size(63, 13) + Me.Label2.Size = New System.Drawing.Size(64, 13) Me.Label2.TabIndex = 19 Me.Label2.Text = "Test String:" ' @@ -82,15 +49,16 @@ Partial Class frmRegexEditor ' 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.Font = New System.Drawing.Font("Consolas", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtTest.Location = New System.Drawing.Point(12, 167) + Me.txtTest.Multiline = True Me.txtTest.Name = "txtTest" - Me.txtTest.Size = New System.Drawing.Size(405, 20) + Me.txtTest.Size = New System.Drawing.Size(487, 136) Me.txtTest.TabIndex = 18 ' 'Label4 ' - Me.Label4.Location = New System.Drawing.Point(12, 48) + Me.Label4.Location = New System.Drawing.Point(12, 110) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(419, 33) Me.Label4.TabIndex = 17 @@ -100,9 +68,9 @@ Partial Class frmRegexEditor 'Label1 ' Me.Label1.AutoSize = True - Me.Label1.Location = New System.Drawing.Point(12, 9) + Me.Label1.Location = New System.Drawing.Point(12, 69) Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(103, 13) + Me.Label1.Size = New System.Drawing.Size(108, 13) Me.Label1.TabIndex = 16 Me.Label1.Text = "Regular Expression:" ' @@ -110,41 +78,117 @@ Partial Class frmRegexEditor ' 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.Font = New System.Drawing.Font("Consolas", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtRegex.Location = New System.Drawing.Point(12, 85) Me.txtRegex.Name = "txtRegex" - Me.txtRegex.Size = New System.Drawing.Size(405, 20) + Me.txtRegex.Size = New System.Drawing.Size(487, 22) Me.txtRegex.TabIndex = 15 ' + 'RibbonControl1 + ' + Me.RibbonControl1.CommandLayout = DevExpress.XtraBars.Ribbon.CommandLayout.Simplified + Me.RibbonControl1.ExpandCollapseItem.Id = 0 + Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItem1, Me.BarButtonItem2, Me.BarStaticItem1, Me.labelResult}) + Me.RibbonControl1.Location = New System.Drawing.Point(0, 0) + Me.RibbonControl1.MaxItemId = 6 + Me.RibbonControl1.Name = "RibbonControl1" + Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) + Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] + Me.RibbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide + Me.RibbonControl1.ShowToolbarCustomizeItem = False + Me.RibbonControl1.Size = New System.Drawing.Size(511, 66) + Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1 + Me.RibbonControl1.Toolbar.ShowCustomizeItem = False + ' + 'BarButtonItem1 + ' + Me.BarButtonItem1.Caption = "Speichern und schließen" + Me.BarButtonItem1.Id = 1 + Me.BarButtonItem1.ImageOptions.SvgImage = Global.DigitalData.Controls.RegexEditor.My.Resources.Resources.actions_check1 + Me.BarButtonItem1.Name = "BarButtonItem1" + ' + 'BarButtonItem2 + ' + Me.BarButtonItem2.Caption = "Regular Expression testen" + Me.BarButtonItem2.Id = 2 + Me.BarButtonItem2.ImageOptions.SvgImage = Global.DigitalData.Controls.RegexEditor.My.Resources.Resources.definednameuseinformula1 + Me.BarButtonItem2.Name = "BarButtonItem2" + ' + 'BarStaticItem1 + ' + Me.BarStaticItem1.Caption = "Ergebnis" + Me.BarStaticItem1.Id = 3 + Me.BarStaticItem1.ImageOptions.SvgImage = Global.DigitalData.Controls.RegexEditor.My.Resources.Resources.about + Me.BarStaticItem1.Name = "BarStaticItem1" + Me.BarStaticItem1.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph + ' + 'RibbonPage1 + ' + Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1}) + Me.RibbonPage1.Name = "RibbonPage1" + Me.RibbonPage1.Text = "RibbonPage1" + ' + 'RibbonPageGroup1 + ' + Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem1) + Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem2) + Me.RibbonPageGroup1.Name = "RibbonPageGroup1" + Me.RibbonPageGroup1.Text = "RibbonPageGroup1" + ' + 'RibbonStatusBar1 + ' + Me.RibbonStatusBar1.ItemLinks.Add(Me.BarStaticItem1) + Me.RibbonStatusBar1.ItemLinks.Add(Me.labelResult) + Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 309) + Me.RibbonStatusBar1.Name = "RibbonStatusBar1" + Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1 + Me.RibbonStatusBar1.Size = New System.Drawing.Size(511, 22) + ' + 'RibbonPage2 + ' + Me.RibbonPage2.Name = "RibbonPage2" + Me.RibbonPage2.Text = "RibbonPage2" + ' + 'labelResult + ' + Me.labelResult.Caption = "" + Me.labelResult.Id = 5 + Me.labelResult.Name = "labelResult" + ' 'frmRegexEditor ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(429, 235) - Me.Controls.Add(Me.btnTest) - Me.Controls.Add(Me.btnSave) - Me.Controls.Add(Me.labelResult) - Me.Controls.Add(Me.Label3) + Me.ClientSize = New System.Drawing.Size(511, 331) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.txtTest) Me.Controls.Add(Me.Label4) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.txtRegex) - Me.IconOptions.ShowIcon = False + Me.Controls.Add(Me.RibbonStatusBar1) + Me.Controls.Add(Me.RibbonControl1) + Me.IconOptions.SvgImage = Global.DigitalData.Controls.RegexEditor.My.Resources.Resources.definednameuseinformula2 Me.Name = "frmRegexEditor" + Me.Ribbon = Me.RibbonControl1 + Me.StatusBar = Me.RibbonStatusBar1 Me.Text = "Regex Editor" + CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() End Sub - - 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 Label4 As Label Friend WithEvents Label1 As Label Friend WithEvents txtRegex As TextBox + Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl + Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage + Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup + Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar + Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage + Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents BarStaticItem1 As DevExpress.XtraBars.BarStaticItem + Friend WithEvents labelResult As DevExpress.XtraBars.BarStaticItem End Class diff --git a/Controls.RegexEditor/frmRegexEditor.vb b/Controls.RegexEditor/frmRegexEditor.vb index 761ac9a9..687d9104 100644 --- a/Controls.RegexEditor/frmRegexEditor.vb +++ b/Controls.RegexEditor/frmRegexEditor.vb @@ -4,6 +4,8 @@ Public Class frmRegexEditor Public RegexString As String Public Sub New(RegexString As String) + MyBase.New() + ' Dieser Aufruf ist für den Designer erforderlich. InitializeComponent() @@ -15,21 +17,22 @@ Public Class frmRegexEditor txtRegex.Text = RegexString End Sub - Private Sub btnTest_Click(sender As Object, e As EventArgs) Handles btnTest.Click + Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick + RegexString = txtRegex.Text + Close() + End Sub + + Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick Try Dim oTestString As String = txtTest.Text If Regex.IsMatch(oTestString, txtRegex.Text) Then - labelResult.Text = "Test String ist gültig." + labelResult.Caption = "Test String ist gültig." Else - labelResult.Text = "Test String ist nicht gültig." + labelResult.Caption = "Test String ist nicht gültig." End If Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, "Regex Test") End Try End Sub - - Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click - RegexString = txtRegex.Text - End Sub End Class \ No newline at end of file