MS2909
This commit is contained in:
@@ -130,9 +130,13 @@ Public Class ClassFolderWatcher
|
||||
End Function
|
||||
Private Shared Sub OnCreated(source As Object, e As FileSystemEventArgs)
|
||||
Try
|
||||
If e.FullPath.Contains("Thumbs.") Or e.FullPath.EndsWith(".tmp") Or e.FullPath.Contains("\~$") Then
|
||||
Exit Sub
|
||||
End If
|
||||
For Each row As DataRow In DTEXCLUDE_FILES.Rows
|
||||
Dim content As String = row.Item(0).ToString.ToLower
|
||||
If e.FullPath.ToLower.Contains(content) Then
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim handleType As String
|
||||
If e.FullPath.EndsWith(".msg") Then
|
||||
handleType = "@FW_OUTLOOK_MESSAGE@"
|
||||
@@ -140,47 +144,13 @@ Public Class ClassFolderWatcher
|
||||
handleType = "@FW_SIMPLEINDEXER@"
|
||||
End If
|
||||
'Die Datei übergeben
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> OnCreated-File:" & CURRENT_FILENAME, False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> OnCreated-File:" & e.FullPath, False)
|
||||
If ClassIndexFunctions.FileExistsinDropTable(CURRENT_FILENAME) = False Then
|
||||
ClassFilehandle.Decide_FileHandle(e.FullPath, handleType)
|
||||
Else
|
||||
Console.WriteLine("File existiert bereits")
|
||||
End If
|
||||
'frmMain.MyNewTimer()
|
||||
|
||||
'ShowIndexForm()
|
||||
'Dim file = CURRENT_FILENAME
|
||||
'Dim frm As New frmIndex
|
||||
'frm.ShowDialog()
|
||||
''Jetzt die Anhänge auslesen
|
||||
'If file.EndsWith(".msg") Then
|
||||
' Dim _msg As New Msg.Message(CURRENT_FILENAME)
|
||||
' Dim i1 As Integer = 1
|
||||
' For Each attachment As Independentsoft.Msg.Attachment In _msg.Attachments
|
||||
' If attachment.DisplayName Is Nothing Then
|
||||
' If Not attachment.LongFileName Is Nothing And Not attachment.LongFileName.Contains("inline") Then
|
||||
' Dim tempfile As String = Path.Combine(Path.GetTempPath, attachment.LongFileName)
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> Attachment (" & i1 & "):" & tempfile, False)
|
||||
' attachment.Save(tempfile)
|
||||
' CURRENT_FILENAME = "@ATTMNTEXTRACTED@" & tempfile
|
||||
' frmIndex.ShowDialog()
|
||||
' i1 += 1
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
|
||||
|
||||
'End If
|
||||
|
||||
''Prüfen ob alle Files abgearbeitet wurden
|
||||
'Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND USER@WORK = '" & Environment.UserName & "'")
|
||||
'If DT.Rows.Count > 0 Then
|
||||
' For Each row As DataRow In DT.Rows
|
||||
' MsgBox("Abbrechen nicht möglich:" & vbNewLine & "Bitte indexieren Sie die folgende Datei vollständig:", MsgBoxStyle.Exclamation)
|
||||
' CURRENT_FILENAME = row.Item(1)
|
||||
' frmIndex.ShowDialog()
|
||||
' Next
|
||||
'End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei folder_watch_Created")
|
||||
End Try
|
||||
|
||||
Reference in New Issue
Block a user