This commit is contained in:
2024-04-29 12:00:36 +02:00
5 changed files with 43 additions and 17 deletions

View File

@@ -64,14 +64,29 @@ Public Class Form1
End Function
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim oResult = FolderBrowserDialog1.ShowDialog()
Dim oInputPath As String = "E:\TestFiles\ZUGFERDService\Input"
Dim DI As DirectoryInfo = New DirectoryInfo(oInputPath)
Dim oResult As DialogResult = DialogResult.OK
If DI.Exists = False Then
' Nur öffnen, wenn Pfad ungültig ist
oResult = FolderBrowserDialog1.ShowDialog()
oInputPath = FolderBrowserDialog1.SelectedPath
End If
If oResult = DialogResult.OK Then
Dim args As New WorkerArgs() With {
.MaxAttachmentSizeInMegaBytes = 10,
.IgnoreRejectionStatus = False,
.NamePortal = "TEST FROM FORM",
.WatchDirectory = FolderBrowserDialog1.SelectedPath
.WatchDirectory = oInputPath,
.SuccessDirectory = "E:\TestFiles\ZUGFERDService\Result\Success",
.ErrorDirectory = "E:\TestFiles\ZUGFERDService\Result\Error",
.OriginalEmailDirectory = "E:\TestFiles\ZUGFERDService\Result\Original_eml",
.RejectedEmailDirectory = "E:\TestFiles\ZUGFERDService\Result\Rejected_eml",
.AttachmentsSubDirectory = "Attachments",
.RejectionTemplateId = 1
}
args = LoadPropertyMapFor(args)