7 Commits

Author SHA1 Message Date
Jonathan Jenne
e21dff197f ZUGFeRDService: Version 1.7.0 2021-08-09 10:42:56 +02:00
Jonathan Jenne
029da899aa SQLConfig: Version 1.0.2 2021-08-02 11:58:52 +02:00
Jonathan Jenne
68c5f4dd3e SQLCommon: Make form title configurable 2021-08-02 11:58:34 +02:00
Jonathan Jenne
62b69bc685 Language: version 1.3.2 2021-08-02 11:58:06 +02:00
Jonathan Jenne
bc4f6e42e6 Windream: Normalize paths 2021-08-02 11:57:35 +02:00
Jonathan Jenne
850cbb2973 Language: RemoveInvalidCharacters catches exceptions 2021-08-02 11:56:45 +02:00
Jonathan Jenne
8d1dddb101 SQLConfig: turn into class lib again 2021-07-30 13:26:52 +02:00
9 changed files with 62 additions and 65 deletions

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.3.1.0")>
<Assembly: AssemblyFileVersion("1.3.1.0")>
<Assembly: AssemblyVersion("1.3.2.0")>
<Assembly: AssemblyFileVersion("1.3.2.0")>

View File

@@ -124,26 +124,30 @@ Public Class Utils
Public Shared Function RemoveInvalidCharacters(pString As String) As String
Dim oResult = pString
' Remove all Unicode above Codepoint U+10000
oResult = Regex.Replace(oResult, InvalidChars.UnicodeSurrogates, String.Empty)
Try
' Remove all Unicode above Codepoint U+10000
oResult = Regex.Replace(oResult, InvalidChars.UnicodeSurrogates, String.Empty)
' Remove all Emojis (Version 13)
oResult = Regex.Replace(oResult, InvalidChars.Emojis, String.Empty)
' Remove all Emojis (Version 13)
oResult = Regex.Replace(oResult, InvalidChars.Emojis, String.Empty)
' Remove Invalid filename characters
oResult = Regex.Replace(oResult, InvalidChars.Filenames, String.Empty)
' Remove Invalid filename characters
oResult = Regex.Replace(oResult, InvalidChars.Filenames, String.Empty)
' Remove Invalid filename characters
oResult = Regex.Replace(oResult, InvalidChars.Paths, String.Empty)
' Remove Invalid filename characters
oResult = Regex.Replace(oResult, InvalidChars.Paths, String.Empty)
' Remove Uneccessary characters
oResult = Regex.Replace(oResult, "\s{2,}", " ")
oResult = Regex.Replace(oResult, "\.{2,}", ".")
' Remove Uneccessary characters
oResult = Regex.Replace(oResult, "\s{2,}", " ")
oResult = Regex.Replace(oResult, "\.{2,}", ".")
' Remove excess space chars
oResult = oResult.Trim()
' Remove excess space chars
oResult = oResult.Trim()
Return oResult
Return oResult
Catch ex As Exception
Return oResult
End Try
End Function
''' <summary>

View File

@@ -15,50 +15,50 @@ Public Class Helpers
INDEX_TYPE_VECTOR_TIME
}
Friend Shared Function ConvertVectorType(vType As Object, value As String)
Friend Shared Function ConvertVectorType(pIndexType As Integer, pValue As String)
Dim myArray
ReDim myArray(0)
Select Case vType
Select Case pIndexType
Case INDEX_TYPE_HASH ' 36865
'Umwandeln in String
myArray(0) = CStr(value)
myArray(0) = CStr(pValue)
Return myArray
Case INDEX_TYPE_VECTOR_STRING '4097
'Umwandeln in String
myArray(0) = CStr(value)
myArray(0) = CStr(pValue)
Return myArray
Case INDEX_TYPE_VECTOR_INTEGER '4098
'Umwandeln in Integer
myArray(0) = CInt(value.Replace(" ", ""))
myArray(0) = CInt(pValue.Replace(" ", ""))
Return myArray
Case INDEX_TYPE_VECTOR_FLOAT '4099
value = value.
pValue = pValue.
Replace(" ", "").
Replace(".", ",")
'Umwandeln in Double
myArray(0) = CDbl(value)
myArray(0) = CDbl(pValue)
Return myArray
Case INDEX_TYPE_VECTOR_BOOLEAN '4100
'Umwandeln in Boolean
myArray(0) = CBool(value)
myArray(0) = CBool(pValue)
Return myArray
Case INDEX_TYPE_VECTOR_DATE '4101
'Umwandeln in Date
myArray(0) = CDate(value)
myArray(0) = CDate(pValue)
Return myArray
Case INDEX_TYPE_VECTOR_INTEGER_64BIT '4107
myArray(0) = Convert.ToInt64(value)
myArray(0) = Convert.ToInt64(pValue)
Return myArray
Case INDEX_TYPE_VECTOR_DATE_TIME '4103
'Umwandeln in Datum Uhrzeit
Return value
Return pValue
Case 8204
'Umwandeln in Integer
myArray(0) = CInt(value.Replace(" ", ""))
myArray(0) = CInt(pValue.Replace(" ", ""))
Return myArray
Case Else
'Umwandeln in String
myArray(0) = CStr(value)
myArray(0) = CStr(pValue)
Return myArray
End Select
End Function

View File

@@ -1,4 +1,8 @@
Imports WINDREAMLib
Imports System.IO
Imports System.IO.Path
Imports System.Text.RegularExpressions
Imports WINDREAMLib
Imports WINDREAMLib.WMCOMEvent
Imports WINDREAMLib.WMEntity
Imports WINDREAMLib.WMObjectEditMode
@@ -6,10 +10,9 @@ Imports WMOBRWSLib
Imports WMOSRCHLib
Imports WMCNNCTDLLLib
Imports WMOTOOLLib
Imports System.IO
Imports System.IO.Path
Imports DigitalData.Modules.Logging
Imports System.Text.RegularExpressions
Imports DigitalData.Modules.Language
''' <module>Windream</module>
''' <version>0.0.0.2</version>
@@ -165,6 +168,12 @@ Public Class Windream
Me.SessionServername = SessionServerName
Me.ClientBasePath = GetNormalizedBasePath(BasePath)
_logger.Debug("ClientBasePath: [{0}]", ClientBasePath)
_logger.Debug("ClientDriveLetter: [{0}]", ClientDriveLetter)
_logger.Debug("SessionServername: [{0}]", SessionServerName)
_logger.Debug("SessionUserName: [{0}]", SessionUserName)
_logger.Debug("SessionDomain: [{0}]", SessionDomain)
If ClientDriveLetter = String.Empty Then
UsesDriveLetter = False
End If
@@ -766,7 +775,10 @@ Public Class Windream
End Function
Public Function GetNormalizedPath(Path As String) As String
Dim oNormalizedPath = GetCleanedPath(Path)
'Dim oNormalizedPath = GetCleanedPath(Path)
Dim oNormalizedPath = Language.Utils.RemoveInvalidCharacters(Path)
_logger.Debug("Normalizing Path: [{0}]", oNormalizedPath)
Try
' Convert any forward slashes / and double slashes \\ into backslashes \
' See: https://stackoverflow.com/questions/3144492/how-do-i-get-nets-path-combine-to-convert-forward-slashes-to-backslashes

View File

@@ -11,28 +11,3 @@
Option Strict On
Option Explicit On
Namespace My
'HINWEIS: Diese Datei wird automatisch generiert und darf nicht direkt bearbeitet werden. Wenn Sie Änderungen vornehmen möchten
' oder in dieser Datei Buildfehler auftreten, wechseln Sie zum Projekt-Designer.
' (Wechseln Sie dazu zu den Projekteigenschaften, oder doppelklicken Sie auf den Knoten "Mein Projekt" im
' Projektmappen-Explorer). Nehmen Sie auf der Registerkarte "Anwendung" entsprechende Änderungen vor.
'
Partial Friend Class MyApplication
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Public Sub New()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.DigitalData.Controls.SQLConfig.frmSQLConfig
End Sub
End Class
End Namespace

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' indem Sie "*" wie unten gezeigt eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
<Assembly: AssemblyVersion("1.0.2.0")>
<Assembly: AssemblyFileVersion("1.0.2.0")>

View File

@@ -5,12 +5,13 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{65EFB268-C0E0-40C1-8981-9F70DEE5C74A}</ProjectGuid>
<OutputType>WinExe</OutputType>
<StartupObject>DigitalData.Controls.SQLConfig.My.MyApplication</StartupObject>
<OutputType>Library</OutputType>
<StartupObject>
</StartupObject>
<RootNamespace>DigitalData.Controls.SQLConfig</RootNamespace>
<AssemblyName>DigitalData.Controls.SQLConfig</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>WindowsForms</MyType>
<MyType>Windows</MyType>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>

View File

@@ -12,6 +12,7 @@ Public Class frmSQLConfig
Private ReadOnly LogConfig As LogConfig
Public Property ConnectionString As String = String.Empty
Public Property FormTitle As String = ""
Public Sub New()
' Dieser Aufruf ist für den Designer erforderlich.
@@ -32,6 +33,10 @@ Public Class frmSQLConfig
Private Sub frmSQLConfig_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim oConnectionString = ConnectionString
If FormTitle.Count > 0 Then
Text = $"{FormTitle} - {Text}"
End If
If Not oConnectionString = String.Empty Then
Dim oBuilder As SqlConnectionStringBuilder
Try

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.6.0.0")>
<Assembly: AssemblyVersion("1.7.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>