Improve Logging, Fix Email Indexing
This commit is contained in:
parent
4f6e7ef049
commit
c145111e5c
@ -11,13 +11,13 @@ Public Class ClassFileDrop
|
||||
|
||||
Public Shared Function Drop_File(e As DragEventArgs)
|
||||
Try
|
||||
LOGGER.Info("Available Drop Formats:")
|
||||
LOGGER.Debug("Available Drop Formats:")
|
||||
|
||||
For Each oFormat As String In e.Data.GetFormats()
|
||||
LOGGER.Info(oFormat)
|
||||
LOGGER.Debug(oFormat)
|
||||
Next
|
||||
|
||||
LOGGER.Info(">> Drop_File")
|
||||
LOGGER.Info("Drop_File")
|
||||
files_dropped = Nothing
|
||||
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
|
||||
Dim MyFiles() As String
|
||||
@ -26,7 +26,7 @@ Public Class ClassFileDrop
|
||||
MyFiles = e.Data.GetData(DataFormats.FileDrop)
|
||||
' 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))
|
||||
LOGGER.Info("Simple FileDrop - File: " & MyFiles(i))
|
||||
ReDim Preserve files_dropped(i)
|
||||
files_dropped(i) = "|DROPFROMFSYSTEM|" & MyFiles(i)
|
||||
' ListBox1.Items.Add(MyFiles(i))
|
||||
@ -85,10 +85,10 @@ Public Class ClassFileDrop
|
||||
If (finTemp.Exists = True) Then
|
||||
ReDim Preserve files_dropped(0)
|
||||
files_dropped(0) = "|OUTLOOK_ATTACHMENT|" & strOutFile
|
||||
LOGGER.Info(">> Drop an Attachment - File: " & strOutFile)
|
||||
LOGGER.Info("Drop an Attachment - File: " & strOutFile)
|
||||
Return True
|
||||
Else
|
||||
LOGGER.Info(">> Attachment File from Outlook could not be created")
|
||||
LOGGER.Info("Attachment File from Outlook could not be created")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@ -102,7 +102,7 @@ Public Class ClassFileDrop
|
||||
Return False
|
||||
End Try
|
||||
|
||||
LOGGER.Info(">> Drop of msg")
|
||||
LOGGER.Info(" Drop of msg")
|
||||
'supports a drop of a Outlook message
|
||||
Dim myobj As Outlook.MailItem
|
||||
For i As Integer = 1 To oApp.ActiveExplorer.Selection.Count
|
||||
@ -125,7 +125,7 @@ Public Class ClassFileDrop
|
||||
oFilename = oFilename.Replace("!", "")
|
||||
oFilename = oFilename.Replace("%", "")
|
||||
oFilename = oFilename.Replace("$", "")
|
||||
LOGGER.Info(">> Drop of msg - File:" & oFilename)
|
||||
LOGGER.Info("Drop of msg - File:" & oFilename)
|
||||
Try
|
||||
myobj.SaveAs(oFilename)
|
||||
Catch ex As Exception
|
||||
@ -146,8 +146,6 @@ Public Class ClassFileDrop
|
||||
MsgBox("Error in Drop-File" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
'Private Sub DragDrop_HandleTobit(e As DragEventArgs)
|
||||
|
||||
@ -24,6 +24,8 @@ Public Class frmIndexFileList
|
||||
|
||||
Private Sub btnstartIndex_Click(sender As Object, e As EventArgs) Handles btnstartIndex.Click
|
||||
Try
|
||||
LOGGER.Debug("Starting indexing of {0} files", CheckedListBoxControl1.Items.Count - CheckedListBoxControl1.CheckedItems.Count)
|
||||
|
||||
For index = 0 To CheckedListBoxControl1.ItemCount - 1
|
||||
Dim oRow = MyDataset1.TBGI_FILES_USER.Item(index)
|
||||
Dim oChecked = CheckedListBoxControl1.GetItemChecked(index)
|
||||
@ -41,9 +43,12 @@ Public Class frmIndexFileList
|
||||
End Try
|
||||
End If
|
||||
|
||||
LOGGER.Debug("Removing file from user files: [{0}]", oFilePath)
|
||||
ClassDatabase.Execute_non_Query("DELETE FROM TBGI_FILES_USER WHERE GUID = " & oGuid, True)
|
||||
End If
|
||||
Next
|
||||
|
||||
DialogResult = DialogResult.OK
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Unexpected Error in Clear Multiple Documents: " & ex.Message, MsgBoxStyle.Critical)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user