Add Regex Validation Message

This commit is contained in:
Jonathan Jenne
2019-04-30 17:27:19 +02:00
parent 963105669a
commit 3f5236ad65
6 changed files with 477 additions and 386 deletions

View File

@@ -1,4 +1,5 @@
Imports System.ComponentModel
Imports System.ComponentModel.Design
Imports System.Drawing.Design
Imports System.Globalization
@@ -9,67 +10,26 @@ Public Module ModuleControlProperties
End Enum
Public Class BaseProperties
Private _id As Integer
Private _name As String
Private _location As Point
Private _size As Size
Private _font As Font
Private _text_color As Color
Private _changed_at As Date
Private _changed_who As String
<Category("Allgemein")>
<[ReadOnly](True)>
Public Property ChangedAt As Date
Get
Return _changed_at
End Get
Set(value As Date)
_changed_at = value
End Set
End Property
<Category("Allgemein")>
<[ReadOnly](True)>
Public Property ChangedWho As String
Get
Return _changed_who
End Get
Set(value As String)
_changed_who = value
End Set
End Property
<Category("Allgemein")>
<[ReadOnly](True)>
Public Property ID() As Integer
Get
Return _id
End Get
Set(value As Integer)
_id = value
End Set
End Property
<Category("Allgemein")>
Public Property Name() As String
Get
Return _name
End Get
Set(value As String)
_name = value
End Set
End Property
<Category("Anzeige")>
Public Property Location() As Point
Get
Return _location
End Get
Set(value As Point)
_location = value
End Set
End Property
<Category("Anzeige")>
Public Property Size() As Size
@@ -102,13 +62,6 @@ Public Module ModuleControlProperties
<Category("Anzeige")>
Public Property TextColor As Color
Get
Return _text_color
End Get
Set(value As Color)
_text_color = value
End Set
End Property
Class FontConverter
Inherits TypeConverter
@@ -123,55 +76,24 @@ Public Module ModuleControlProperties
Public Class InputProperties
Inherits BaseProperties
Private _required As Boolean
Private _read_only As Boolean
Private _index_type As String
Private _indicies As List(Of String)
Private _index As String
Private _sql_command As String
Private _default_value
Public Property Required() As Boolean
Get
Return _required
End Get
Set(ByVal value As Boolean)
_required = value
End Set
End Property
<Category("Validierung")>
Public Property [ReadOnly]() As Boolean
Get
Return _read_only
End Get
Set(ByVal value As Boolean)
_read_only = value
End Set
End Property
<Browsable(False)>
<Category("Indexierung")>
Public Property IndexType() As IndexTypes
Get
Return _index_type
End Get
Set(ByVal value As IndexTypes)
_index_type = value
End Set
End Property
''' <summary>
''' Diese Eigenschaft enthält die auswählbaren Indicies, die für das Control verfügbar sind. Wird nicht direkt angezeigt.
''' </summary>
<Browsable(False)>
Public Property Indicies() As List(Of String)
Get
Return _indicies
End Get
Set(ByVal value As List(Of String))
_indicies = value
End Set
End Property
''' <summary>
''' Diese Eigenschaft enthält des ausgewählten Index
@@ -179,13 +101,6 @@ Public Module ModuleControlProperties
<Category("Indexierung")>
<TypeConverter(GetType(IndexListConverter))>
Public Property Index() As String
Get
Return _index
End Get
Set(value As String)
_index = value
End Set
End Property
<Category("Daten")>
Public Property SQLCommand() As SQLValue
@@ -211,79 +126,41 @@ Public Module ModuleControlProperties
Public Class TextboxProperties
Inherits InputProperties
<Category("Validierung")>
<Editor(GetType(ClassRegexEditor), GetType(UITypeEditor))>
Public Property Regex As String
<Category("Validierung")>
<Editor(GetType(MultilineStringEditor), GetType(UITypeEditor))>
Public Property RegexMessage As String
End Class
Public Class LabelProperties
Inherits BaseProperties
Private _text As String
<Category("Allgemein")>
Public Property Text() As String
Get
Return _text
End Get
Set(value As String)
_text = value
End Set
End Property
End Class
Public Class CheckboxProperties
Inherits InputProperties
Private _text As String
<Category("Allgemein")>
Public Property Text() As String
Get
Return _text
End Get
Set(value As String)
_text = value
End Set
End Property
End Class
Public Class ComboboxProperties
Inherits InputProperties
Private _text As String
Private _choice_list As String
Private _choice_lists As List(Of String)
<Category("Allgemein")>
Public Property Text() As String
Get
Return _text
End Get
Set(value As String)
_text = value
End Set
End Property
<Browsable(False)>
Public Property ChoiceLists() As List(Of String)
Get
Return _choice_lists
End Get
Set(value As List(Of String))
_choice_lists = value
End Set
End Property
<Category("Daten")>
<TypeConverter(GetType(ChoiceListConverter))>
Public Property ChoiceList() As String
Get
Return _choice_list
End Get
Set(value As String)
_choice_list = value
End Set
End Property
Public Class ChoiceListConverter
Inherits TypeConverter