This commit is contained in:
PitzM 2024-04-17 16:00:43 +02:00
parent 9c5b0889ee
commit 0841f82ba9

View File

@ -64,14 +64,29 @@ Public Class Form1
End Function End Function
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click 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 If oResult = DialogResult.OK Then
Dim args As New WorkerArgs() With { Dim args As New WorkerArgs() With {
.MaxAttachmentSizeInMegaBytes = 10, .MaxAttachmentSizeInMegaBytes = 10,
.IgnoreRejectionStatus = False, .IgnoreRejectionStatus = False,
.NamePortal = "TEST FROM FORM", .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) args = LoadPropertyMapFor(args)