MS V2.7 .Net Logger etc

This commit is contained in:
2021-06-15 16:28:55 +02:00
parent e2619eb3ad
commit e796ae91cb
109 changed files with 295499 additions and 8793 deletions

View File

@@ -5,7 +5,7 @@ Public Class ClassDragDrop
Public Shared files_dropped As String()
Public Shared Function Drop_File(e As DragEventArgs)
Try
If LogErrorsOnly = False Then ClassLogger.Add(" >> In Drop_File....", False)
LOGGER.Debug("In Drop_File....")
files_dropped = Nothing
Dim sql As String = "DELETE FROM TBPMO_FILES_USER WHERE HANDLE_TYPE <> 'SCAN' AND UPPER(USER_WORK) = UPPER('" & USER_USERNAME & "')"
@@ -13,14 +13,14 @@ Public Class ClassDragDrop
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> Simple File Drop", False)
LOGGER.Debug("Simple File Drop")
Dim MyFiles() As String
Dim i As Integer
' Assign the files to an array.
MyFiles = e.Data.GetData(DataFormats.FileDrop)
' Loop through the array and add the files to the list.
For i = 0 To MyFiles.Length - 1
ClassLogger.Add(">> Simple FileDrop - File: " & MyFiles(i), False)
LOGGER.Info("Simple FileDrop - File: " & MyFiles(i))
ReDim Preserve files_dropped(i)
files_dropped(i) = "@DROPFROMFSYSTEM@" & MyFiles(i)
' ListBox1.Items.Add(MyFiles(i))
@@ -60,7 +60,7 @@ Public Class ClassDragDrop
'// get the actual raw file into memory
Dim msInput As IO.MemoryStream = CType(e.Data.GetData("FileContents", True), IO.MemoryStream) 'This returns nothing for an Email
If msInput Is Nothing = False Then
If LogErrorsOnly = False Then ClassLogger.Add(" >> Drag of Outlook Attachment", False)
LOGGER.Debug("Drag of Outlook Attachment")
'// allocate enough bytes to hold the raw date
Dim aryFileBytes(CType(msInput.Length, Int32)) As Byte
'// set starting position at first byte and read in the raw data
@@ -79,17 +79,17 @@ Public Class ClassDragDrop
If (finTemp.Exists = True) Then
ReDim Preserve files_dropped(0)
files_dropped(0) = "@OUTLOOK_ATTACHMENT@" & strOutFile
If LogErrorsOnly = False Then ClassLogger.Add(" >> Drop an Attachment - File: " & strOutFile, False)
LOGGER.Debug("Drop an Attachment - File: " & strOutFile)
Return True
Else
ClassLogger.Add(">> Attachment File from Outlook could not be created", False)
LOGGER.Warn("Attachment File from Outlook could not be created")
End If
Else
ClassLogger.Add(">> No simple drag and drop.", True, False)
LOGGER.Warn("No simple drag and drop.", True)
For Each fmt As String In e.Data.GetFormats()
' Output format name and type
ClassLogger.Add(">> e.Data is: " & fmt + " (" +
e.Data.GetData(fmt).ToString() + ")", True, False)
LOGGER.Warn("e.Data is: " & fmt + " (" +
e.Data.GetData(fmt).ToString() + ")", True)
Next
End If
@@ -102,7 +102,7 @@ Public Class ClassDragDrop
MsgBox("Unexpected error in Initialisieren von Outlook-API:" & vbNewLine & ex.Message & vbNewLine & vbNewLine & "Evtl ist Outlook nicht in der dafür vorgesehenen For")
Return False
End Try
If LogErrorsOnly = False Then ClassLogger.Add(" >> Drop of msg", False)
LOGGER.Debug("Drop of msg")
'supports a drop of a Outlook message
Dim myobj As Object
For i As Integer = 1 To oApp.ActiveExplorer.Selection.Count
@@ -123,7 +123,7 @@ Public Class ClassDragDrop
strFile = strFile.Replace("!", "")
strFile = strFile.Replace("%", "")
strFile = strFile.Replace("$", "")
ClassLogger.Add(">> Drop of msg - File:" & strFile, False)
LOGGER.Info("Drop of msg - File:" & strFile)
Try
myobj.SaveAs(strFile)
Catch ex As Exception
@@ -156,22 +156,22 @@ Public Class ClassDragDrop
My.Settings.WD_INDEXDOKART_SAVE = ""
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.All
If LogErrorsOnly = True Then ClassLogger.Add("DragEnter ... SimpleFileDrop", False)
LOGGER.Debug("DragEnter ... SimpleFileDrop")
'frmForm_Constructor_Main_2.tslblStatusMain_show(True, "DragEnter ... SimpleFileDrop")
ElseIf (e.Data.GetDataPresent("FileGroupDescriptor")) AndAlso (e.Data.GetDataPresent("FileContents")) Then
e.Effect = DragDropEffects.Copy
'frmForm_Constructor_Main_2.tslblStatusMain_show(True, "DragEnter ... Attachment from Outlook")
If LogErrorsOnly = True Then ClassLogger.Add("DragEnter ... Attachment from Outlook", False)
LOGGER.Debug("DragEnter ... Attachment from Outlook")
ElseIf e.Data.GetDataPresent("FileGroupDescriptor") Then
'handle a message dragged from Outlook
e.Effect = DragDropEffects.Copy
'frmForm_Constructor_Main_2.tslblStatusMain_show(True, "DragEnter ... OutlookMessage")
If LogErrorsOnly = True Then ClassLogger.Add("DragEnter ... OutlookMessage", False)
LOGGER.Debug("DragEnter ... OutlookMessage")
Else
'otherwise, do not handle
e.Effect = DragDropEffects.Copy
'frmForm_Constructor.tslblStatusMain_show(True, "DragEnter ... Other FileFormat")
If LogErrorsOnly = True Then ClassLogger.Add("DragEnter ... Other FileFormat", False)
LOGGER.Debug("DragEnter ... Other FileFormat")
End If
Catch ex As Exception