ZooFlow: IDB Admin
This commit is contained in:
@@ -7,7 +7,7 @@ Public Class ClassEmailHeaderExtractor
|
||||
''' </summary>
|
||||
''' <param name="path">Der Pfad einer .msg Datei</param>
|
||||
''' <returns>Headerinformationen als String oder Nothing wenn ein Fehler aufgetreten ist.</returns>
|
||||
Public Shared Function getMessageHeaders(path As String)
|
||||
Public Shared Function getMessageHeaders(path As String) As String
|
||||
Try
|
||||
Dim msg As New Msg.Message(path)
|
||||
Dim headers = msg.TransportMessageHeaders.Replace(vbCrLf, " ")
|
||||
@@ -22,7 +22,7 @@ Public Class ClassEmailHeaderExtractor
|
||||
''' </summary>
|
||||
''' <param name="msg">Eine Email vom Typ Msg.Message</param>
|
||||
''' <returns>Headerinformationen als String oder Nothing wenn ein Fehler aufgetreten ist.</returns>
|
||||
Public Shared Function getMessageHeaders(msg As Msg.Message)
|
||||
Public Shared Function getMessageHeaders(msg As Msg.Message) As String
|
||||
Try
|
||||
Dim headers = msg.TransportMessageHeaders.Replace(vbCrLf, " ")
|
||||
Return headers
|
||||
@@ -38,7 +38,7 @@ Public Class ClassEmailHeaderExtractor
|
||||
''' <param name="RegexList">Eine Liste von Regular Expressions</param>
|
||||
''' <param name="RegexGroup">Die Ergebnisgruppe, die die Adresse enthält</param>
|
||||
''' <returns>Eine Emailadresse oder Nothing, wenn keine der Regular Expressions ein Ergebnis lieferte.</returns>
|
||||
Public Shared Function extractFromAddress(messageHeaders As String, RegexList As List(Of Regex), Optional RegexGroup As Integer = 1)
|
||||
Public Shared Function extractFromAddress(messageHeaders As String, RegexList As List(Of Regex), Optional RegexGroup As Integer = 1) As String
|
||||
If IsNothing(messageHeaders) Then
|
||||
Return Nothing
|
||||
End If
|
||||
@@ -54,9 +54,9 @@ Public Class ClassEmailHeaderExtractor
|
||||
|
||||
Return Nothing
|
||||
End Function
|
||||
Public Shared Function extractFromHeader(messageHeaders As String, Regex As String)
|
||||
Public Shared Function extractFromHeader(messageHeaders As String, Regex As String) As String
|
||||
Try
|
||||
Dim result
|
||||
Dim result As String
|
||||
Dim i As Integer = 0
|
||||
If IsNothing(messageHeaders) Then
|
||||
Return Nothing
|
||||
@@ -93,7 +93,7 @@ Public Class ClassEmailHeaderExtractor
|
||||
''' <param name="RegexList">Eine Liste von Regular Expressions</param>
|
||||
''' <param name="RegexGroup">Die Ergebnisgruppe, die die Adresse enthält</param>
|
||||
''' <returns>Eine Emailadresse oder Nothing, wenn keine der Regular Expressions ein Ergebnis lieferte.</returns>
|
||||
Public Shared Function extractToAddress(messageHeaders As String, RegexList As List(Of Regex), Optional RegexGroup As Integer = 1)
|
||||
Public Shared Function extractToAddress(messageHeaders As String, RegexList As List(Of Regex), Optional RegexGroup As Integer = 1) As String
|
||||
If IsNothing(messageHeaders) Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Imports System.IO
|
||||
Option Strict Off
|
||||
|
||||
Imports System.IO
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports Microsoft.Office.Interop
|
||||
|
||||
@@ -10,7 +12,7 @@ Public Class ClassFileDrop
|
||||
_LOGGER = LogConfig.GetLogger()
|
||||
clsFilehandle = New ClassFilehandle()
|
||||
End Sub
|
||||
Public Function Drop_File(e As DragEventArgs)
|
||||
Public Function Drop_File(e As DragEventArgs) As Boolean
|
||||
Try
|
||||
_LOGGER.Info("Available Drop Formats:")
|
||||
|
||||
@@ -24,7 +26,7 @@ Public Class ClassFileDrop
|
||||
Dim MyFiles() As String
|
||||
Dim i As Integer
|
||||
' Assign the files to an array.
|
||||
MyFiles = e.Data.GetData(DataFormats.FileDrop)
|
||||
MyFiles = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
|
||||
' Loop through the array and add the files to the list.
|
||||
For i = 0 To MyFiles.Length - 1
|
||||
_LOGGER.Info(">> Simple FileDrop - File: " & MyFiles(i))
|
||||
@@ -143,8 +145,4 @@ Public Class ClassFileDrop
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -23,13 +23,13 @@ Public Class ClassFilehandle
|
||||
Dim r = New Regex(String.Format("[{0}]", Regex.Escape(regexSearch)))
|
||||
Return r.Replace(Input, replacement)
|
||||
End Function
|
||||
Public Function Decide_FileHandle(filename As String, handletype As String)
|
||||
Public Function Decide_FileHandle(filename As String, handletype As String) As Boolean
|
||||
Try
|
||||
If filename.EndsWith(".msg") Then
|
||||
My.Application.Globix.CurrMessageID = ""
|
||||
Dim _msg As New Msg.Message(filename)
|
||||
If _msg.Attachments.Count > 0 Then
|
||||
Dim result As MsgBoxResult
|
||||
Dim result As DialogResult
|
||||
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
result = MessageBox.Show(New Form With {.TopMost = True}, "Achtung: Die Email enthält Anhänge!" & vbNewLine & "Wollen Sie die Anhänge separat indexieren und herauslösen?", "Nachfrage zur Indexierung:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
@@ -62,7 +62,7 @@ Public Class ClassFilehandle
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Function Email_Decay(msgname As String, Optional FW As Boolean = False)
|
||||
Private Function Email_Decay(msgname As String, Optional FW As Boolean = False) As Boolean
|
||||
Try
|
||||
Dim msgonly As String = "|MSGONLY|"
|
||||
Dim ATT_EXTR As String = "|ATTMNTEXTRACTED|"
|
||||
@@ -147,7 +147,7 @@ Public Class ClassFilehandle
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function Insert_GI_File(filename As String, handleType As String)
|
||||
Private Function Insert_GI_File(filename As String, handleType As String) As Boolean
|
||||
Try
|
||||
filename = filename.Replace("'", "''")
|
||||
|
||||
@@ -183,9 +183,9 @@ Public Class ClassFilehandle
|
||||
End If
|
||||
|
||||
End Function
|
||||
Public Function Versionierung_Datei(Dateiname As String)
|
||||
Dim extension
|
||||
Dim _NewFileString
|
||||
Public Function Versionierung_Datei(Dateiname As String) As String
|
||||
Dim extension As String
|
||||
Dim _NewFileString As String
|
||||
Try
|
||||
Dim version As Integer = 1
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ Public Class ClassFolderwatcher
|
||||
Logger.Error(ex.Message)
|
||||
End Try
|
||||
End Function
|
||||
Public Function Restart_FolderWatchSCAN()
|
||||
Public Sub Restart_FolderWatchSCAN()
|
||||
Try
|
||||
If FWScan.EnableRaisingEvents = True Then
|
||||
'Gestartet also Stoppen
|
||||
@@ -53,13 +53,9 @@ Public Class ClassFolderwatcher
|
||||
Logger.Info($"Error in Restart_FolderWatchSCAN: {ex.Message}")
|
||||
Logger.Error(ex.Message)
|
||||
End Try
|
||||
End Function
|
||||
Public Function StartStop_FolderWatch()
|
||||
End Sub
|
||||
Public Sub StartStop_FolderWatch()
|
||||
Try
|
||||
If My.Application.Globix.CurrentFolderWatchPath = "" Then
|
||||
'MsgBox("Bitte definieren Sie einen Überwachungsordner:", MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
If FWFolderWatcher Is Nothing Then
|
||||
FWFolderWatcher = New System.IO.FileSystemWatcher(My.Application.Globix.CurrentFolderWatchPath, "*.*")
|
||||
Logger.Info(" >> FolderWatch Gestartet")
|
||||
@@ -70,7 +66,6 @@ Public Class ClassFolderwatcher
|
||||
'SaveConfigValue("my.Application.Globix.Folderwatchstarted", "True")
|
||||
My.UIConfig.Globix.FolderWatchStarted = True
|
||||
My.UIConfigManager.Save()
|
||||
Return 1
|
||||
End If
|
||||
If FWFolderWatcher.EnableRaisingEvents = False Then
|
||||
' Dim watcher As New FileSystemWatcher()
|
||||
@@ -84,7 +79,6 @@ Public Class ClassFolderwatcher
|
||||
'SaveConfigValue("my.Application.Globix.Folderwatchstarted", "True")
|
||||
My.UIConfig.Globix.FolderWatchStarted = True
|
||||
My.UIConfigManager.Save()
|
||||
Return 1
|
||||
Else
|
||||
'Gestartet also Stoppen
|
||||
FWFolderWatcher.EnableRaisingEvents = False
|
||||
@@ -93,15 +87,12 @@ Public Class ClassFolderwatcher
|
||||
'SaveConfigValue("my.Application.Globix.Folderwatchstarted", "False")
|
||||
My.UIConfig.Globix.FolderWatchStarted = False
|
||||
My.UIConfigManager.Save()
|
||||
Return 0
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex.Message)
|
||||
MsgBox("Error in StartStop_FolderWatch:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return 99
|
||||
End Try
|
||||
End Function
|
||||
End Sub
|
||||
Public Function StartStop_FolderWatchSCAN() As Integer
|
||||
Try
|
||||
If My.Application.Globix.CURRENT_SCAN_FOLDERWATCH = "" Then
|
||||
|
||||
Reference in New Issue
Block a user