diff --git a/Controls.RegexEditor/App.config b/Controls.RegexEditor/App.config
new file mode 100644
index 00000000..5534e287
--- /dev/null
+++ b/Controls.RegexEditor/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Controls.RegexEditor/My Project/Application.Designer.vb b/Controls.RegexEditor/My Project/Application.Designer.vb
new file mode 100644
index 00000000..8ab460ba
--- /dev/null
+++ b/Controls.RegexEditor/My Project/Application.Designer.vb
@@ -0,0 +1,13 @@
+'------------------------------------------------------------------------------
+'
+' Dieser Code wurde von einem Tool generiert.
+' Laufzeitversion:4.0.30319.42000
+'
+' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+' der Code erneut generiert wird.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
diff --git a/Controls.RegexEditor/My Project/Application.myapp b/Controls.RegexEditor/My Project/Application.myapp
new file mode 100644
index 00000000..1243847f
--- /dev/null
+++ b/Controls.RegexEditor/My Project/Application.myapp
@@ -0,0 +1,11 @@
+
+
+ true
+ Form1
+ false
+ 0
+ true
+ 0
+ 0
+ true
+
diff --git a/Controls.RegexEditor/My Project/AssemblyInfo.vb b/Controls.RegexEditor/My Project/AssemblyInfo.vb
new file mode 100644
index 00000000..0eda36fb
--- /dev/null
+++ b/Controls.RegexEditor/My Project/AssemblyInfo.vb
@@ -0,0 +1,35 @@
+Imports System
+Imports System.Reflection
+Imports System.Runtime.InteropServices
+
+' Allgemeine Informationen über eine Assembly werden über die folgenden
+' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
+' die einer Assembly zugeordnet sind.
+
+' Werte der Assemblyattribute überprüfen
+
+
+
+
+
+
+
+
+
+
+'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird.
+
+
+' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
+'
+' Hauptversion
+' Nebenversion
+' Buildnummer
+' Revision
+'
+' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
+' übernehmen, indem Sie "*" eingeben:
+'
+
+
+
diff --git a/Controls.RegexEditor/My Project/Resources.Designer.vb b/Controls.RegexEditor/My Project/Resources.Designer.vb
new file mode 100644
index 00000000..6aabab17
--- /dev/null
+++ b/Controls.RegexEditor/My Project/Resources.Designer.vb
@@ -0,0 +1,63 @@
+'------------------------------------------------------------------------------
+'
+' Dieser Code wurde von einem Tool generiert.
+' Laufzeitversion:4.0.30319.42000
+'
+' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+' der Code erneut generiert wird.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+Imports System
+
+Namespace My.Resources
+
+ 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
+ '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
+ 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
+ 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
+ '''
+ ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
+ '''
+ _
+ Friend Module Resources
+
+ Private resourceMan As Global.System.Resources.ResourceManager
+
+ Private resourceCulture As Global.System.Globalization.CultureInfo
+
+ '''
+ ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
+ '''
+ _
+ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
+ Get
+ If Object.ReferenceEquals(resourceMan, Nothing) Then
+ Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DigitalData.Controls.RegexEditor.Resources", GetType(Resources).Assembly)
+ resourceMan = temp
+ End If
+ Return resourceMan
+ End Get
+ End Property
+
+ '''
+ ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
+ ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
+ '''
+ _
+ Friend Property Culture() As Global.System.Globalization.CultureInfo
+ Get
+ Return resourceCulture
+ End Get
+ Set
+ resourceCulture = value
+ End Set
+ End Property
+ End Module
+End Namespace
diff --git a/Controls.RegexEditor/My Project/Resources.resx b/Controls.RegexEditor/My Project/Resources.resx
new file mode 100644
index 00000000..af7dbebb
--- /dev/null
+++ b/Controls.RegexEditor/My Project/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Controls.RegexEditor/My Project/Settings.Designer.vb b/Controls.RegexEditor/My Project/Settings.Designer.vb
new file mode 100644
index 00000000..97fa07cf
--- /dev/null
+++ b/Controls.RegexEditor/My Project/Settings.Designer.vb
@@ -0,0 +1,73 @@
+'------------------------------------------------------------------------------
+'
+' Dieser Code wurde von einem Tool generiert.
+' Laufzeitversion:4.0.30319.42000
+'
+' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+' der Code erneut generiert wird.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My
+
+ _
+ Partial Friend NotInheritable Class MySettings
+ Inherits Global.System.Configuration.ApplicationSettingsBase
+
+ Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
+
+#Region "Automatische My.Settings-Speicherfunktion"
+#If _MyType = "WindowsForms" Then
+ Private Shared addedHandler As Boolean
+
+ Private Shared addedHandlerLockObject As New Object
+
+ _
+ Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
+ If My.Application.SaveMySettingsOnExit Then
+ My.Settings.Save()
+ End If
+ End Sub
+#End If
+#End Region
+
+ Public Shared ReadOnly Property [Default]() As MySettings
+ Get
+
+#If _MyType = "WindowsForms" Then
+ If Not addedHandler Then
+ SyncLock addedHandlerLockObject
+ If Not addedHandler Then
+ AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
+ addedHandler = True
+ End If
+ End SyncLock
+ End If
+#End If
+ Return defaultInstance
+ End Get
+ End Property
+ End Class
+End Namespace
+
+Namespace My
+
+ _
+ Friend Module MySettingsProperty
+
+ _
+ Friend ReadOnly Property Settings() As Global.DigitalData.Controls.RegexEditor.My.MySettings
+ Get
+ Return Global.DigitalData.Controls.RegexEditor.My.MySettings.Default
+ End Get
+ End Property
+ End Module
+End Namespace
diff --git a/Controls.RegexEditor/My Project/Settings.settings b/Controls.RegexEditor/My Project/Settings.settings
new file mode 100644
index 00000000..85b890b3
--- /dev/null
+++ b/Controls.RegexEditor/My Project/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/Controls.RegexEditor/RegexEditor.vb b/Controls.RegexEditor/RegexEditor.vb
new file mode 100644
index 00000000..e6ffbbaf
--- /dev/null
+++ b/Controls.RegexEditor/RegexEditor.vb
@@ -0,0 +1,27 @@
+Imports System.ComponentModel
+Imports System.Drawing.Design
+Imports System.Windows.Forms.Design
+Imports DigitalData.Modules.Language
+
+Public Class RegexEditor
+ Inherits UITypeEditor
+
+ Public Overrides Function GetEditStyle(context As ITypeDescriptorContext) As UITypeEditorEditStyle
+ Return UITypeEditorEditStyle.Modal
+ End Function
+
+ Public Overrides Function EditValue(context As ITypeDescriptorContext, provider As IServiceProvider, value As Object) As Object
+ Dim oService As IWindowsFormsEditorService = TryCast(provider.GetService(GetType(IWindowsFormsEditorService)), IWindowsFormsEditorService)
+ Dim oRegexString As String = Utils.NotNull(value, String.Empty)
+
+ If oService IsNot Nothing Then
+ Using oform As New frmRegexEditor(oRegexString)
+ If oService.ShowDialog(oform) = DialogResult.OK Then
+ value = oform.RegexString
+ End If
+ End Using
+ End If
+
+ Return value
+ End Function
+End Class
diff --git a/Controls.RegexEditor/RegexEditor.vbproj b/Controls.RegexEditor/RegexEditor.vbproj
new file mode 100644
index 00000000..5da54aa2
--- /dev/null
+++ b/Controls.RegexEditor/RegexEditor.vbproj
@@ -0,0 +1,130 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {BCC6942F-CD4B-4B67-8200-1C0D002E7CC2}
+ Library
+
+
+ DigitalData.Controls.RegexEditor
+ DigitalData.Controls.RegexEditor
+ 512
+ Windows
+ v4.6.1
+ true
+
+
+ AnyCPU
+ true
+ full
+ true
+ true
+ bin\Debug\
+ DigitalData.Controls.RegexEditor.xml
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+
+
+ AnyCPU
+ pdbonly
+ false
+ true
+ true
+ bin\Release\
+ DigitalData.Controls.RegexEditor.xml
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+
+
+ On
+
+
+ Binary
+
+
+ Off
+
+
+ On
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ frmRegexEditor.vb
+ Form
+
+
+
+ True
+ Application.myapp
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+ frmRegexEditor.vb
+
+
+ VbMyResourcesResXFileCodeGenerator
+ Resources.Designer.vb
+ My.Resources
+ Designer
+
+
+
+
+ MyApplicationCodeGenerator
+ Application.Designer.vb
+
+
+ SettingsSingleFileGenerator
+ My
+ Settings.Designer.vb
+
+
+
+
+
+ {d3c8cfed-d6f6-43a8-9bdf-454145d0352f}
+ Language
+
+
+
+
\ No newline at end of file
diff --git a/Controls.RegexEditor/frmRegexEditor.Designer.vb b/Controls.RegexEditor/frmRegexEditor.Designer.vb
new file mode 100644
index 00000000..f44562a3
--- /dev/null
+++ b/Controls.RegexEditor/frmRegexEditor.Designer.vb
@@ -0,0 +1,149 @@
+ _
+Partial Class frmRegexEditor
+ Inherits System.Windows.Forms.Form
+
+ 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
+ _
+ 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
+ End Sub
+
+ 'Wird vom Windows Form-Designer benötigt.
+ 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.
+ _
+ 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.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.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
+ '
+ 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:"
+ '
+ 'Label4
+ '
+ 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"
+ '
+ '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.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(51, 13)
+ Me.Label3.TabIndex = 11
+ Me.Label3.Text = "Ergebnis:"
+ '
+ 'Label2
+ '
+ 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.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.Location = New System.Drawing.Point(12, 116)
+ Me.txtTest.Name = "txtTest"
+ Me.txtTest.Size = New System.Drawing.Size(419, 20)
+ Me.txtTest.TabIndex = 9
+ '
+ '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(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
+ '
+ '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(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
+ '
+ '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.Controls.Add(Me.btnTest)
+ Me.Controls.Add(Me.btnSave)
+ Me.Controls.Add(Me.labelResult)
+ Me.Controls.Add(Me.Label3)
+ 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.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 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
+End Class
diff --git a/Controls.RegexEditor/frmRegexEditor.resx b/Controls.RegexEditor/frmRegexEditor.resx
new file mode 100644
index 00000000..1af7de15
--- /dev/null
+++ b/Controls.RegexEditor/frmRegexEditor.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Controls.RegexEditor/frmRegexEditor.vb b/Controls.RegexEditor/frmRegexEditor.vb
new file mode 100644
index 00000000..dfc1b0e8
--- /dev/null
+++ b/Controls.RegexEditor/frmRegexEditor.vb
@@ -0,0 +1,35 @@
+Imports System.Text.RegularExpressions
+
+Public Class frmRegexEditor
+ Public RegexString As String
+
+ Public Sub New(RegexString As String)
+ ' Dieser Aufruf ist für den Designer erforderlich.
+ InitializeComponent()
+
+ ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
+ Me.RegexString = RegexString
+ End Sub
+
+ Private Sub RegexEditor_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+ txtRegex.Text = RegexString
+ End Sub
+
+ Private Sub btnTest_Click(sender As Object, e As EventArgs) Handles btnTest.Click
+ Try
+ Dim oTestString As String = txtTest.Text
+
+ If Regex.IsMatch(oTestString, txtRegex.Text) Then
+ labelResult.Text = "Test String ist gültig."
+ Else
+ labelResult.Text = "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
diff --git a/DDMonorepo.sln b/DDMonorepo.sln
index 5f01bae5..9f992a7f 100644
--- a/DDMonorepo.sln
+++ b/DDMonorepo.sln
@@ -76,6 +76,10 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "LookupControlGui", "LookupC
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "MonoDiag", "LoggerDiag\MonoDiag.vbproj", "{3D437957-B90B-4D8F-9219-6D19B0C90994}"
EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Language", "Modules.Language\Language.vbproj", "{D3C8CFED-D6F6-43A8-9BDF-454145D0352F}"
+EndProject
+Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "RegexEditor", "Controls.RegexEditor\RegexEditor.vbproj", "{BCC6942F-CD4B-4B67-8200-1C0D002E7CC2}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -186,6 +190,14 @@ Global
{3D437957-B90B-4D8F-9219-6D19B0C90994}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D437957-B90B-4D8F-9219-6D19B0C90994}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3D437957-B90B-4D8F-9219-6D19B0C90994}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D3C8CFED-D6F6-43A8-9BDF-454145D0352F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D3C8CFED-D6F6-43A8-9BDF-454145D0352F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D3C8CFED-D6F6-43A8-9BDF-454145D0352F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D3C8CFED-D6F6-43A8-9BDF-454145D0352F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BCC6942F-CD4B-4B67-8200-1C0D002E7CC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BCC6942F-CD4B-4B67-8200-1C0D002E7CC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BCC6942F-CD4B-4B67-8200-1C0D002E7CC2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BCC6942F-CD4B-4B67-8200-1C0D002E7CC2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -217,6 +229,8 @@ Global
{926E6474-5613-4373-BB99-B101158B91EF} = {7AF3F9C2-C939-4A08-95C1-0453207E298A}
{B65E24B3-D334-455D-A0BF-B33B8358B013} = {CC368D6A-6AC4-4EB9-A092-14700FABEF7A}
{3D437957-B90B-4D8F-9219-6D19B0C90994} = {8FFE925E-8B84-45F1-93CB-32B1C96F41EB}
+ {D3C8CFED-D6F6-43A8-9BDF-454145D0352F} = {3E2008C8-27B1-41DD-9B1A-0C4029F6AECC}
+ {BCC6942F-CD4B-4B67-8200-1C0D002E7CC2} = {F98C0329-C004-417F-B2AB-7466E88D8220}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C1BE4090-A0FD-48AF-86CB-39099D14B286}
diff --git a/GUIs.ClientSuite/ClassUtils.vb b/GUIs.ClientSuite/ClassUtils.vb
index f8d50e14..69565a62 100644
--- a/GUIs.ClientSuite/ClassUtils.vb
+++ b/GUIs.ClientSuite/ClassUtils.vb
@@ -1,35 +1,3 @@
Public Class ClassUtils
- '''
- ''' Generates a random short (8 characters) guid
- '''
- ''' The generated guid as a String
- Public Shared Function ShortGUID() As String
- Return Guid.NewGuid().ToString().GetHashCode().ToString("x")
- End Function
- '''
- ''' Converts a String value to the given Enum
- '''
- ''' The Enum Type
- ''' The string value to convert
- Public Shared Function ToEnum(Of T)(value As String) As T
- Return [Enum].Parse(GetType(T), value)
- End Function
-
- '''
- ''' Checks a value for three different `null` values,
- ''' Nothing, Empty String, DBNull
- '''
- ''' Returns the original value if the value is not null, or `defaultValue`
- '''
- ''' The type of the value
- ''' The value
- ''' The default Value
- Public Function NotNull(Of T)(ByVal value As T, ByVal defaultValue As T) As T
- If IsNothing(value) OrElse String.IsNullOrEmpty(value.ToString) OrElse IsDBNull(value) Then
- Return defaultValue
- Else
- Return value
- End If
- End Function
End Class
diff --git a/GUIs.ClientSuite/ClientSuite.vbproj b/GUIs.ClientSuite/ClientSuite.vbproj
index 50f24ede..2e9cbeb1 100644
--- a/GUIs.ClientSuite/ClientSuite.vbproj
+++ b/GUIs.ClientSuite/ClientSuite.vbproj
@@ -504,6 +504,10 @@
{44982f9b-6116-44e2-85d0-f39650b1ef99}
Config
+
+ {d3c8cfed-d6f6-43a8-9bdf-454145d0352f}
+ Language
+
{5ebacbfa-f11a-4bbf-8d02-91461f2293ed}
License
diff --git a/GUIs.ClientSuite/FormDesigner/frmFormDesigner.vb b/GUIs.ClientSuite/FormDesigner/frmFormDesigner.vb
index 475cd49c..bb946667 100644
--- a/GUIs.ClientSuite/FormDesigner/frmFormDesigner.vb
+++ b/GUIs.ClientSuite/FormDesigner/frmFormDesigner.vb
@@ -8,6 +8,7 @@ Imports DigitalData.Controls.LookupGrid
Imports DigitalData.GUIs.ClientSuite.Controls
Imports DigitalData.GUIs.ClientSuite.Controls.Properties
Imports DigitalData.GUIs.ClientSuite.Controls.Editors
+Imports DigitalData.Modules.Language
Public Class frmFormDesigner
Private _FormId As Int64
@@ -47,7 +48,7 @@ Public Class frmFormDesigner
Dim oPosition As Point = LayoutControlMain.PointToClient(MousePosition)
Dim oHitInfo As BaseLayoutItemHitInfo = LayoutControlMain.CalcHitInfo(oPosition)
Dim oLayoutControl As LayoutControlItem = DirectCast(_DragItem, LayoutControlItem)
- Dim oControlName As String = oLayoutControl.Tag & ClassUtils.ShortGUID()
+ Dim oControlName As String = oLayoutControl.Tag & Utils.ShortGUID()
Dim oControl As Control = _ControlLoader.CreateLayoutControl(oLayoutControl.Tag, oControlName, 0)
If oLayoutControl IsNot Nothing Then
diff --git a/Modules.Database/BaseClass.vb b/Modules.Database/BaseClass.vb
new file mode 100644
index 00000000..c5400025
--- /dev/null
+++ b/Modules.Database/BaseClass.vb
@@ -0,0 +1,5 @@
+Public MustInherit Class BaseClass
+ Public MustOverride Function GetDatatable(SqlCommand As String) As DataTable
+ Public MustOverride Function GetScalarValue(SqlCommand As String) As Object
+ Public MustOverride Function ExecuteNonQuery(SqlCommand As String) As Boolean
+End Class
diff --git a/Modules.Database/Constants.vb b/Modules.Database/Constants.vb
new file mode 100644
index 00000000..76bc98be
--- /dev/null
+++ b/Modules.Database/Constants.vb
@@ -0,0 +1,5 @@
+Public Class Constants
+ Public Const PROVIDER_MSSQL = "MS-SQL"
+ Public Const PROVIDER_ORACLE = "ORACLE"
+ Public Const PROVIDER_ODBC = "ODBC"
+End Class
diff --git a/Modules.Database/Database.vbproj b/Modules.Database/Database.vbproj
index 1549b877..d81dd7c2 100644
--- a/Modules.Database/Database.vbproj
+++ b/Modules.Database/Database.vbproj
@@ -90,6 +90,8 @@
+
+
diff --git a/Modules.Database/Firebird.vb b/Modules.Database/Firebird.vb
index 14f89eb6..bac43c79 100644
--- a/Modules.Database/Firebird.vb
+++ b/Modules.Database/Firebird.vb
@@ -46,6 +46,8 @@ Imports DigitalData.Modules.Logging
''' REMARKS: If the connection fails due to "wrong username or password", the cause might be that the server harddrive is full..
'''
Public Class Firebird
+ Inherits BaseClass
+
Private _Logger As Logger
Private _LogConfig As LogConfig
Private _connectionServer As String
@@ -183,7 +185,7 @@ Public Class Firebird
''' The Firebird connection to use
''' True, if command was executed sucessfully. Otherwise false.
Public Function ExecuteNonQueryWithConnection(SqlCommand As String, Connection As FbConnection, Optional TransactionMode As TransactionMode = TransactionMode.WithTransaction, Optional Transaction As FbTransaction = Nothing) As Boolean
- _logger.Debug("Executing Non-Query: {0}", SqlCommand)
+ _Logger.Debug("Executing Non-Query: {0}", SqlCommand)
If Connection Is Nothing Then
_Logger.Warn("Connection is nothing!")
@@ -219,7 +221,7 @@ Public Class Firebird
'''
''' The command to execute
''' True, if command was executed sucessfully. Otherwise false.
- Public Function ExecuteNonQuery(SqlCommand As String) As Boolean
+ Public Overrides Function ExecuteNonQuery(SqlCommand As String) As Boolean
Dim oConnection As FbConnection = GetConnection()
Dim oScalarValue As Object = ExecuteNonQueryWithConnection(SqlCommand, oConnection)
oConnection.Close()
@@ -234,7 +236,7 @@ Public Class Firebird
''' The Firebird connection to use
''' The scalar value if the command was executed successfully. Nothing otherwise.
Public Function GetScalarValueWithConnection(SqlQuery As String, Connection As FbConnection, Optional TransactionMode As TransactionMode = TransactionMode.WithTransaction, Optional Transaction As FbTransaction = Nothing) As Object
- _logger.Debug("Fetching Scalar-Value: {0}", SqlQuery)
+ _Logger.Debug("Fetching Scalar-Value: {0}", SqlQuery)
If Connection Is Nothing Then
_Logger.Warn("Connection is nothing!")
@@ -252,7 +254,7 @@ Public Class Firebird
}
oResult = oCommand.ExecuteScalar()
Catch ex As Exception
- _logger.Error(ex, $"Error in ReturnScalar while executing command: '{SqlQuery}'")
+ _Logger.Error(ex, $"Error in ReturnScalar while executing command: '{SqlQuery}'")
Throw ex
Finally
MaybeCommitTransaction(oTransaction, TransactionMode)
@@ -266,7 +268,7 @@ Public Class Firebird
'''
''' The query to execute
''' The scalar value if the command was executed successfully. Nothing otherwise.
- Public Function GetScalarValue(SqlQuery As String) As Object
+ Public Overrides Function GetScalarValue(SqlQuery As String) As Object
Dim oConnection As FbConnection = GetConnection()
Dim oScalarValue As Object = GetScalarValueWithConnection(SqlQuery, oConnection)
oConnection.Close()
@@ -281,7 +283,7 @@ Public Class Firebird
''' The Firebird connection to use
''' A datatable containing the results if the command was executed successfully. Nothing otherwise.
Public Function GetDatatableWithConnection(SqlQuery As String, Connection As FbConnection, Optional TransactionMode As TransactionMode = TransactionMode.NoTransaction, Optional Transaction As FbTransaction = Nothing) As DataTable
- _logger.Debug("Fetching Datatable: {0}", SqlQuery)
+ _Logger.Debug("Fetching Datatable: {0}", SqlQuery)
If Connection Is Nothing Then
_Logger.Warn("Connection is nothing!")
@@ -302,7 +304,7 @@ Public Class Firebird
oAdapter.Fill(oDatatable)
Catch ex As Exception
- _logger.Error(ex, $"Error in GetDatatableWithConnection while executing command: '{SqlQuery}'")
+ _Logger.Error(ex, $"Error in GetDatatableWithConnection while executing command: '{SqlQuery}'")
Throw ex
Finally
MaybeCommitTransaction(oTransaction, TransactionMode)
@@ -316,9 +318,9 @@ Public Class Firebird
'''
''' The query to execute
''' A datatable containing the results if the command was executed successfully. Nothing otherwise.
- Public Function GetDatatable(SqlQuery As String, Optional TransactionMode As TransactionMode = TransactionMode.NoTransaction) As DataTable
+ Public Overrides Function GetDatatable(SqlQuery As String) As DataTable
Dim oConnection As FbConnection = GetConnection()
- Dim oDatatable As DataTable = GetDatatableWithConnection(SqlQuery, oConnection, TransactionMode)
+ Dim oDatatable As DataTable = GetDatatableWithConnection(SqlQuery, oConnection)
oConnection.Close()
Return oDatatable
diff --git a/Modules.Database/MSSQLServer.vb b/Modules.Database/MSSQLServer.vb
index 139a13f0..7b92e2eb 100644
--- a/Modules.Database/MSSQLServer.vb
+++ b/Modules.Database/MSSQLServer.vb
@@ -2,12 +2,17 @@
Imports DigitalData.Modules.Logging
Public Class MSSQLServer
+ Inherits BaseClass
+
Public DBInitialized As Boolean = False
Public CurrentSQLConnectionString As String = ""
+
+ Private _Timeout As Integer
Private _Logger As Logger
- Public Sub New(LogConfig As LogConfig, ConnectionString As String)
+ Public Sub New(LogConfig As LogConfig, ConnectionString As String, Optional Timeout As Integer = 120)
_Logger = LogConfig.GetLogger()
+ _Timeout = Timeout
CurrentSQLConnectionString = ConnectionString
@@ -19,6 +24,31 @@ Public Class MSSQLServer
End Try
End Sub
+ Public Sub New(LogConfig As LogConfig, Server As String, Database As String, UserId As String, Password As String, Optional Timeout As Integer = 120)
+ _Logger = LogConfig.GetLogger()
+ _Timeout = Timeout
+
+ CurrentSQLConnectionString = GetConnectionString(Server, Database, UserId, Password)
+
+ Try
+ DBInitialized = TestCanConnect()
+ Catch ex As Exception
+ DBInitialized = False
+ _Logger.Error(ex)
+ End Try
+ End Sub
+
+ Public Shared Function GetConnectionString(Server As String, Database As String, UserId As String, Password As String) As String
+ Dim oConnectionStringBuilder As New SqlConnectionStringBuilder() With {
+ .DataSource = Server,
+ .InitialCatalog = Database,
+ .UserId = UserId,
+ .Password = Password
+ }
+
+ Return oConnectionStringBuilder.ToString
+ End Function
+
Private Function TestCanConnect() As Boolean
Try
Dim oConnection As New SqlConnection(CurrentSQLConnectionString)
@@ -41,14 +71,13 @@ Public Class MSSQLServer
Return Nothing
End Try
End Function
+
'''
''' Returns a datatable for a sql-statement
'''
- ''' sqlcommand for datatable (select XYZ from TableORView)
- ''' Optional Timeout
+ ''' sqlcommand for datatable (select XYZ from TableORView)
''' Returns a datatable
- '''
- Public Function GetDatatable(sqlcommand As String, Optional Timeout As Integer = 120) As DataTable
+ Public Overrides Function GetDatatable(SqlCommand As String) As DataTable
Try
If TestCanConnect() = False Then
Return Nothing
@@ -56,8 +85,8 @@ Public Class MSSQLServer
Using oConnection = GetSQLConnection()
Using oSQLCOmmand = oConnection.CreateCommand()
- oSQLCOmmand.CommandText = sqlcommand
- oSQLCOmmand.CommandTimeout = Timeout
+ oSQLCOmmand.CommandText = SqlCommand
+ oSQLCOmmand.CommandTimeout = _Timeout
Dim dt As DataTable = New DataTable()
Dim oAdapter As SqlDataAdapter = New SqlDataAdapter(oSQLCOmmand)
@@ -67,23 +96,23 @@ Public Class MSSQLServer
End Using
Catch ex As Exception
_Logger.Error(ex)
- _Logger.Debug("sqlcommand: " & sqlcommand)
+ _Logger.Debug("sqlcommand: " & SqlCommand)
Return Nothing
End Try
End Function
+
'''
''' Executes the passed sql-statement
'''
''' the sql statement
- ''' Optional Timeout
''' Returns true if properly executed, else false
'''
- Public Function NewExecutenonQuery(executeStatement As String, Optional Timeout As Integer = 120) As Boolean
+ Public Function NewExecutenonQuery(executeStatement As String) As Boolean
_Logger.Warn("NewExecutenonQuery is deprecated. Use ExecuteNonQuery instead.")
- Return ExecuteNonQuery(executeStatement, Timeout)
+ Return ExecuteNonQuery(executeStatement)
End Function
- Public Function ExecuteNonQuery(SQLCommand As String, Optional Timeout As Integer = 120) As Boolean
+ Public Overrides Function ExecuteNonQuery(SQLCommand As String) As Boolean
Try
If TestCanConnect() = False Then
Return Nothing
@@ -92,7 +121,7 @@ Public Class MSSQLServer
Using oConnection = GetSQLConnection()
Using oSQLCOmmand = oConnection.CreateCommand()
oSQLCOmmand.CommandText = SQLCommand
- oSQLCOmmand.CommandTimeout = Timeout
+ oSQLCOmmand.CommandTimeout = _Timeout
oSQLCOmmand.ExecuteNonQuery()
Return True
End Using
@@ -108,15 +137,13 @@ Public Class MSSQLServer
''' Executes the passed sql-statement as Scalar
'''
''' the sql statement
- ''' Optional Timeout
''' Returns true if properly executed, else false
- '''
- Public Function NewExecuteScalar(ScalarSQL As String, Optional Timeout As Integer = 120) As Object
+ Public Function NewExecuteScalar(ScalarSQL As String) As Object
_Logger.Warn("NewExecuteScalar is deprecated. Use GetScalarValue instead.")
- Return GetScalarValue(ScalarSQL, Timeout)
+ Return GetScalarValue(ScalarSQL)
End Function
- Public Function GetScalarValue(SQLQuery As String, Optional Timeout As Integer = 120) As Object
+ Public Overrides Function GetScalarValue(SQLQuery As String) As Object
Try
If TestCanConnect() = False Then
Return Nothing
@@ -125,7 +152,7 @@ Public Class MSSQLServer
Using oConnection As SqlConnection = GetSQLConnection()
Using oSQLCOmmand = oConnection.CreateCommand()
oSQLCOmmand.CommandText = SQLQuery
- oSQLCOmmand.CommandTimeout = Timeout
+ oSQLCOmmand.CommandTimeout = _Timeout
Dim oResult As Object = oSQLCOmmand.ExecuteScalar()
Return oResult
End Using
diff --git a/Modules.Database/ODBC.vb b/Modules.Database/ODBC.vb
index 2d95c07d..07f343e0 100644
--- a/Modules.Database/ODBC.vb
+++ b/Modules.Database/ODBC.vb
@@ -2,6 +2,8 @@
Imports DigitalData.Modules.Logging
Public Class ODBC
+ Inherits BaseClass
+
Private _Logger As Logger
Private _LogConfig As LogConfig
@@ -86,7 +88,7 @@ Public Class ODBC
'''
''' The command to execute
''' True, if command was executed sucessfully. Otherwise false.
- Public Function ExecuteNonQuery(SqlCommand As String) As Boolean
+ Public Overrides Function ExecuteNonQuery(SqlCommand As String) As Boolean
Dim oConnection As OdbcConnection = GetConnection()
Dim oScalarValue As Object = ExecuteNonQueryWithConnection(SqlCommand, oConnection)
oConnection.Close()
@@ -126,7 +128,7 @@ Public Class ODBC
'''
''' The query to execute
''' A datatable containing the results if the command was executed successfully. Nothing otherwise.
- Public Function GetScalarValue(SqlQuery As String) As Object
+ Public Overrides Function GetScalarValue(SqlQuery As String) As Object
Dim oConnection As OdbcConnection = GetConnection()
Dim oDatatable As DataTable = GetDatatableWithConnection(SqlQuery, oConnection)
oConnection.Close()
@@ -169,7 +171,7 @@ Public Class ODBC
'''
''' The query to execute
''' A datatable containing the results if the command was executed successfully. Nothing otherwise.
- Public Function GetDatatable(SqlQuery As String) As DataTable
+ Public Overrides Function GetDatatable(SqlQuery As String) As DataTable
Dim oConnection As OdbcConnection = GetConnection()
Dim oDatatable As DataTable = GetDatatableWithConnection(SqlQuery, oConnection)
oConnection.Close()
diff --git a/Modules.Database/Oracle.vb b/Modules.Database/Oracle.vb
index c260f73e..d40662ae 100644
--- a/Modules.Database/Oracle.vb
+++ b/Modules.Database/Oracle.vb
@@ -1,35 +1,53 @@
-Imports Oracle.ManagedDataAccess.Client
+Imports DigitalData.Modules.Logging
+Imports Oracle.ManagedDataAccess.Client
+
Public Class Oracle
- Private Shared Logger As NLog.Logger = NLog.LogManager.GetCurrentClassLogger
Public DBInitialized As Boolean = False
Public CurrentOracleConnectionString As String = ""
- Public Sub New(CONSTRING As String)
- Init(CONSTRING)
+
+ Private _Timeout As Integer
+ Private _Logger As Logger
+
+ Public Sub New(LogConfig As LogConfig, ConnectionString As String, Optional Timeout As Integer = 120)
+ _Timeout = Timeout
+ _Logger = LogConfig.GetLogger()
+
+ CurrentOracleConnectionString = ConnectionString
+ DBInitialized = TestCanConnect(CurrentOracleConnectionString)
End Sub
- Public Function Init(CONSTRING As String)
+
+ Public Sub New(LogConfig As LogConfig, Server As String, Database As String, UserId As String, Password As String, Optional Timeout As Integer = 120)
+ _Timeout = Timeout
+ _Logger = LogConfig.GetLogger()
+
+ CurrentOracleConnectionString = GetConnectionString(Server, Database, UserId, Password)
+ DBInitialized = TestCanConnect(CurrentOracleConnectionString)
+ End Sub
+
+ Private Function TestCanConnect(ConnectionString As String) As Boolean
Try
Dim oSQLconnect As New OracleConnection
- oSQLconnect.ConnectionString = CONSTRING
+ oSQLconnect.ConnectionString = ConnectionString
oSQLconnect.Open()
oSQLconnect.Close()
- CurrentOracleConnectionString = CONSTRING
- DBInitialized = True
Return True
Catch ex As Exception
- DBInitialized = False
- Logger.Error(ex)
- 'clsLogger.Add("Error in DatabaseInit: " & ex.Message, True)
+ _Logger.Error(ex)
Return False
End Try
End Function
+
+ Public Shared Function GetConnectionString(Server As String, Database As String, UserId As String, Password As String) As String
+ Dim oConnectionString = $"Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={Server})(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME={Database})));User Id={UserId};Password={Password};"
+ Return oConnectionString
+ End Function
+
'''
''' Returns a datatable for a sql-statement
'''
''' sqlcommand for datatable (select XYZ from TableORView)
- ''' Optional Timeout
''' Returns a datatable
- '''
- Public Function GetDatatable(sqlcommand As String, Optional commandtimeout As Integer = 120) As DataTable
+ Public Function GetDatatable(sqlcommand As String) As DataTable
Try
Dim oSQLconnect As New OracleConnection
Dim oSQLCOmmand As OracleCommand
@@ -37,15 +55,15 @@ Public Class Oracle
oSQLconnect.Open()
oSQLCOmmand = oSQLconnect.CreateCommand()
oSQLCOmmand.CommandText = sqlcommand
- oSQLCOmmand.CommandTimeout = commandtimeout
+ oSQLCOmmand.CommandTimeout = _Timeout
Dim adapter1 As OracleDataAdapter = New OracleDataAdapter(oSQLCOmmand)
Dim dt As DataTable = New DataTable()
adapter1.Fill(dt)
oSQLconnect.Close()
Return dt
Catch ex As Exception
- Logger.Error(ex)
- Logger.Debug("sqlcommand: " & sqlcommand)
+ _Logger.Error(ex)
+ _Logger.Debug("sqlcommand: " & sqlcommand)
Return Nothing
End Try
End Function
@@ -53,10 +71,8 @@ Public Class Oracle
''' Executes the passed sql-statement
'''
''' the sql statement
- ''' Optional Timeout
''' Returns true if properly executed, else false
- '''
- Public Function NewExecutenonQuery(executeStatement As String, Optional commandtimeout As Integer = 120) As Boolean
+ Public Function NewExecutenonQuery(executeStatement As String) As Boolean
Try
Dim oSQLconnect As New OracleConnection
Dim oSQLCOmmand As OracleCommand
@@ -64,55 +80,24 @@ Public Class Oracle
oSQLconnect.Open()
oSQLCOmmand = oSQLconnect.CreateCommand()
oSQLCOmmand.CommandText = executeStatement
- oSQLCOmmand.CommandTimeout = commandtimeout
+ oSQLCOmmand.CommandTimeout = _Timeout
oSQLCOmmand.ExecuteNonQuery()
oSQLCOmmand.Dispose()
oSQLconnect.Close()
Return True
Catch ex As Exception
- Logger.Error(ex)
- Logger.Debug("executeStatement: " & executeStatement)
+ _Logger.Error(ex)
+ _Logger.Debug("executeStatement: " & executeStatement)
Return False
End Try
End Function
- '''
- ''' Executes the passed sql-statement in asyncmode
- '''
- ''' the sql statement
- ''' Optional Timeout
- '''
- Public Sub NewExecuteNonQueryAsync(executeStatement As String, Optional commandtimeout As Integer = 120)
- Dim oSQLconnect As New OracleConnection
- Dim oSQLCOmmand As OracleCommand
- Dim callback As New AsyncCallback(AddressOf Execute_non_Query_Async_Callback)
- Try
- oSQLconnect.ConnectionString = CurrentOracleConnectionString
- oSQLconnect.Open()
- oSQLCOmmand = oSQLconnect.CreateCommand()
- oSQLCOmmand.CommandText = executeStatement
- oSQLCOmmand.CommandTimeout = commandtimeout
- oSQLCOmmand.ExecuteNonQuery()
- oSQLCOmmand.Dispose()
- oSQLconnect.Close()
- Catch ex As Exception
- Logger.Error(ex)
- Logger.Debug("executeStatement: " & executeStatement)
- End Try
- End Sub
- Private Sub Execute_non_Query_Async_Callback(ByVal result As IAsyncResult)
- Dim command As OracleCommand = CType(result.AsyncState, OracleCommand)
- Dim res = command.ExecuteNonQuery
- Logger.Info(String.Format("Finished executing Async database operation: {0}", command.CommandText))
- End Sub
'''
''' Executes the passed sql-statement as Scalar
'''
''' the sql statement
- ''' Optional Timeout
- ''' Returns true if properly executed, else false
- '''
- Public Function NewExecuteScalar(executeStatement As String, Optional commandtimeout As Integer = 120)
+ ''' Returns the scalarvalue
+ Public Function NewExecuteScalar(executeStatement As String)
Dim result
Try
Dim oSQLconnect As New OracleConnection
@@ -121,15 +106,15 @@ Public Class Oracle
oSQLconnect.Open()
oSQLCOmmand = oSQLconnect.CreateCommand()
oSQLCOmmand.CommandText = executeStatement
- oSQLCOmmand.CommandTimeout = commandtimeout
+ oSQLCOmmand.CommandTimeout = _Timeout
result = oSQLCOmmand.ExecuteScalar()
oSQLCOmmand.Dispose()
oSQLconnect.Close()
Return result
Catch ex As Exception
- Logger.Error(ex)
- Logger.Debug("executeStatement: " & executeStatement)
- Return Nothing
+ _Logger.Error(ex)
+ _Logger.Debug("executeStatement: " & executeStatement)
+ Throw ex
End Try
End Function
End Class
diff --git a/Modules.Language/Language.vbproj b/Modules.Language/Language.vbproj
new file mode 100644
index 00000000..5f6d2554
--- /dev/null
+++ b/Modules.Language/Language.vbproj
@@ -0,0 +1,103 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {D3C8CFED-D6F6-43A8-9BDF-454145D0352F}
+ Library
+ DigitalData.Modules.Language
+ DigitalData.Modules.Language
+ 512
+ Windows
+ v4.6.1
+
+
+ true
+ full
+ true
+ true
+ bin\Debug\
+ DigitalData.Modules.Language.xml
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+
+
+ pdbonly
+ false
+ true
+ true
+ bin\Release\
+ DigitalData.Modules.Language.xml
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+
+
+ On
+
+
+ Binary
+
+
+ Off
+
+
+ On
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ Application.myapp
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+ VbMyResourcesResXFileCodeGenerator
+ Resources.Designer.vb
+ My.Resources
+ Designer
+
+
+
+
+ MyApplicationCodeGenerator
+ Application.Designer.vb
+
+
+ SettingsSingleFileGenerator
+ My
+ Settings.Designer.vb
+
+
+
+
\ No newline at end of file
diff --git a/Modules.Language/My Project/Application.Designer.vb b/Modules.Language/My Project/Application.Designer.vb
new file mode 100644
index 00000000..8ab460ba
--- /dev/null
+++ b/Modules.Language/My Project/Application.Designer.vb
@@ -0,0 +1,13 @@
+'------------------------------------------------------------------------------
+'
+' Dieser Code wurde von einem Tool generiert.
+' Laufzeitversion:4.0.30319.42000
+'
+' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+' der Code erneut generiert wird.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
diff --git a/Modules.Language/My Project/Application.myapp b/Modules.Language/My Project/Application.myapp
new file mode 100644
index 00000000..758895de
--- /dev/null
+++ b/Modules.Language/My Project/Application.myapp
@@ -0,0 +1,10 @@
+
+
+ false
+ false
+ 0
+ true
+ 0
+ 1
+ true
+
diff --git a/Modules.Language/My Project/AssemblyInfo.vb b/Modules.Language/My Project/AssemblyInfo.vb
new file mode 100644
index 00000000..a7bd2b77
--- /dev/null
+++ b/Modules.Language/My Project/AssemblyInfo.vb
@@ -0,0 +1,35 @@
+Imports System
+Imports System.Reflection
+Imports System.Runtime.InteropServices
+
+' Allgemeine Informationen über eine Assembly werden über die folgenden
+' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
+' die einer Assembly zugeordnet sind.
+
+' Werte der Assemblyattribute überprüfen
+
+
+
+
+
+
+
+
+
+
+'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird.
+
+
+' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
+'
+' Hauptversion
+' Nebenversion
+' Buildnummer
+' Revision
+'
+' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
+' übernehmen, indem Sie "*" eingeben:
+'
+
+
+
diff --git a/Modules.Language/My Project/Resources.Designer.vb b/Modules.Language/My Project/Resources.Designer.vb
new file mode 100644
index 00000000..92ca1652
--- /dev/null
+++ b/Modules.Language/My Project/Resources.Designer.vb
@@ -0,0 +1,63 @@
+'------------------------------------------------------------------------------
+'
+' Dieser Code wurde von einem Tool generiert.
+' Laufzeitversion:4.0.30319.42000
+'
+' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+' der Code erneut generiert wird.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+Imports System
+
+Namespace My.Resources
+
+ 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
+ '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
+ 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
+ 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
+ '''
+ ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
+ '''
+ _
+ Friend Module Resources
+
+ Private resourceMan As Global.System.Resources.ResourceManager
+
+ Private resourceCulture As Global.System.Globalization.CultureInfo
+
+ '''
+ ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
+ '''
+ _
+ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
+ Get
+ If Object.ReferenceEquals(resourceMan, Nothing) Then
+ Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DigitalData.Modules.Language.Resources", GetType(Resources).Assembly)
+ resourceMan = temp
+ End If
+ Return resourceMan
+ End Get
+ End Property
+
+ '''
+ ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
+ ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
+ '''
+ _
+ Friend Property Culture() As Global.System.Globalization.CultureInfo
+ Get
+ Return resourceCulture
+ End Get
+ Set
+ resourceCulture = value
+ End Set
+ End Property
+ End Module
+End Namespace
diff --git a/Modules.Language/My Project/Resources.resx b/Modules.Language/My Project/Resources.resx
new file mode 100644
index 00000000..af7dbebb
--- /dev/null
+++ b/Modules.Language/My Project/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Modules.Language/My Project/Settings.Designer.vb b/Modules.Language/My Project/Settings.Designer.vb
new file mode 100644
index 00000000..503a0ca8
--- /dev/null
+++ b/Modules.Language/My Project/Settings.Designer.vb
@@ -0,0 +1,73 @@
+'------------------------------------------------------------------------------
+'
+' Dieser Code wurde von einem Tool generiert.
+' Laufzeitversion:4.0.30319.42000
+'
+' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+' der Code erneut generiert wird.
+'
+'------------------------------------------------------------------------------
+
+Option Strict On
+Option Explicit On
+
+
+Namespace My
+
+ _
+ Partial Friend NotInheritable Class MySettings
+ Inherits Global.System.Configuration.ApplicationSettingsBase
+
+ Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
+
+#Region "Automatische My.Settings-Speicherfunktion"
+#If _MyType = "WindowsForms" Then
+ Private Shared addedHandler As Boolean
+
+ Private Shared addedHandlerLockObject As New Object
+
+ _
+ Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
+ If My.Application.SaveMySettingsOnExit Then
+ My.Settings.Save()
+ End If
+ End Sub
+#End If
+#End Region
+
+ Public Shared ReadOnly Property [Default]() As MySettings
+ Get
+
+#If _MyType = "WindowsForms" Then
+ If Not addedHandler Then
+ SyncLock addedHandlerLockObject
+ If Not addedHandler Then
+ AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
+ addedHandler = True
+ End If
+ End SyncLock
+ End If
+#End If
+ Return defaultInstance
+ End Get
+ End Property
+ End Class
+End Namespace
+
+Namespace My
+
+ _
+ Friend Module MySettingsProperty
+
+ _
+ Friend ReadOnly Property Settings() As Global.DigitalData.Modules.Language.My.MySettings
+ Get
+ Return Global.DigitalData.Modules.Language.My.MySettings.Default
+ End Get
+ End Property
+ End Module
+End Namespace
diff --git a/Modules.Language/My Project/Settings.settings b/Modules.Language/My Project/Settings.settings
new file mode 100644
index 00000000..85b890b3
--- /dev/null
+++ b/Modules.Language/My Project/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/Modules.Language/Utils.vb b/Modules.Language/Utils.vb
new file mode 100644
index 00000000..99219905
--- /dev/null
+++ b/Modules.Language/Utils.vb
@@ -0,0 +1,38 @@
+'''
+''' Provides common utility functions that do not require a specific context.
+'''
+Public Class Utils
+ '''
+ ''' Generates a random short (8 characters) guid
+ '''
+ ''' The generated guid as a String
+ Public Shared Function ShortGUID() As String
+ Return Guid.NewGuid().ToString().GetHashCode().ToString("x")
+ End Function
+
+ '''
+ ''' Converts a String value to the given Enum
+ '''
+ ''' The Enum Type
+ ''' The string value to convert
+ Public Shared Function ToEnum(Of T)(value As String) As T
+ Return [Enum].Parse(GetType(T), value)
+ End Function
+
+ '''
+ ''' Checks a value for three different `null` values,
+ ''' Nothing, Empty String, DBNull
+ '''
+ ''' Returns the original value if the value is not null, or `defaultValue`
+ '''
+ ''' The type of the value
+ ''' The value
+ ''' The default Value
+ Public Shared Function NotNull(Of T)(ByVal value As T, ByVal defaultValue As T) As T
+ If IsNothing(value) OrElse String.IsNullOrEmpty(value.ToString) OrElse IsDBNull(value) Then
+ Return defaultValue
+ Else
+ Return value
+ End If
+ End Function
+End Class