Integrate Language Module from Monorepo, clean up references
This commit is contained in:
@@ -36,4 +36,45 @@
|
||||
|
||||
Return bytearray
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Versucht einen String in einen Boolean zu konvertieren
|
||||
''' </summary>
|
||||
''' <param name="str">Der zu konvertierende String</param>
|
||||
''' <returns>Den umgewandelten Wert oder False</returns>
|
||||
Public Function StrToBool(str As String) As Boolean
|
||||
Dim result As Boolean = False
|
||||
|
||||
Try
|
||||
result = Convert.ToBoolean(str)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
result = False
|
||||
End Try
|
||||
|
||||
Return result
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Konvertiert eine Zahl in die entsprechende Farbe
|
||||
''' </summary>
|
||||
Public Function IntToColor(int As Integer) As Color
|
||||
Return ColorTranslator.FromWin32(int)
|
||||
End Function
|
||||
|
||||
Public Function PrepareLogMessage(LogMessage As String) As String
|
||||
Dim oLogSplit As String()
|
||||
oLogSplit = LogMessage.Split("|")
|
||||
|
||||
If oLogSplit.Count < 3 Then
|
||||
Return LogMessage
|
||||
Else
|
||||
Dim omsg = oLogSplit(2).
|
||||
Replace("'", "''").
|
||||
Replace("\\n", "").
|
||||
Replace(Chr(13), "").
|
||||
Replace(Chr(10), "")
|
||||
Return omsg
|
||||
End If
|
||||
End Function
|
||||
End Module
|
||||
|
||||
Reference in New Issue
Block a user