clean up frmFileTest
This commit is contained in:
parent
b8855659b4
commit
97806fe9cd
@ -19,14 +19,12 @@ Public Class frmFileTest
|
|||||||
.Multiselect = True
|
.Multiselect = True
|
||||||
}
|
}
|
||||||
|
|
||||||
Dim oDialogResult = oDialog.ShowDialog()
|
If oDialog.ShowDialog() <> DialogResult.OK Then
|
||||||
|
|
||||||
If oDialogResult <> DialogResult.OK Then
|
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Try
|
For Each oFileName In oDialog.FileNames
|
||||||
For Each oFileName In oDialog.FileNames
|
Try
|
||||||
Dim oSW As New Stopwatch()
|
Dim oSW As New Stopwatch()
|
||||||
oSW.Start()
|
oSW.Start()
|
||||||
|
|
||||||
@ -35,7 +33,7 @@ Public Class frmFileTest
|
|||||||
oSW.Stop()
|
oSW.Stop()
|
||||||
|
|
||||||
If oResult.OK = False Then
|
If oResult.OK = False Then
|
||||||
MsgBox(oResult.ErrorMessage)
|
listboxLog.Items.Add($"Document upload failed! Reason: '{oResult.ErrorMessage}'")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -43,11 +41,12 @@ Public Class frmFileTest
|
|||||||
listboxLog.Items.Add($"Filename: {oResult.Document.FileName}")
|
listboxLog.Items.Add($"Filename: {oResult.Document.FileName}")
|
||||||
listboxLog.Items.Add($"Time in milliseconds: {oSW.ElapsedMilliseconds}")
|
listboxLog.Items.Add($"Time in milliseconds: {oSW.ElapsedMilliseconds}")
|
||||||
listboxLog.Items.Add($"----------------------------------------------------------")
|
listboxLog.Items.Add($"----------------------------------------------------------")
|
||||||
Next
|
Catch ex As Exception
|
||||||
Catch ex As Exception
|
listboxLog.Items.Add($"Document upload failed! Reason: '{ex.Message}'")
|
||||||
ShowErrorMessage(ex)
|
Logger.Error(ex)
|
||||||
Logger.Error(ex)
|
End Try
|
||||||
End Try
|
Next
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Private Sub btnDocByDocId_Click(sender As Object, e As EventArgs)
|
'Private Sub btnDocByDocId_Click(sender As Object, e As EventArgs)
|
||||||
|
|||||||
@ -33,7 +33,7 @@ Public Class Document
|
|||||||
''' Connect to the service
|
''' Connect to the service
|
||||||
''' </summary>
|
''' </summary>
|
||||||
''' <returns>True if connection was successful, false otherwise</returns>
|
''' <returns>True if connection was successful, false otherwise</returns>
|
||||||
Public Function Connect()
|
Public Function Connect() As Boolean
|
||||||
Try
|
Try
|
||||||
_channel = GetChannel()
|
_channel = GetChannel()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user