From 0841f82ba9cbee956352ee664aa3f2c3dd9c5898 Mon Sep 17 00:00:00 2001 From: pitzm Date: Wed, 17 Apr 2024 16:00:43 +0200 Subject: [PATCH] TEST-Gui --- GUIs.Test.ZUGFeRDTest/Form1.vb | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/GUIs.Test.ZUGFeRDTest/Form1.vb b/GUIs.Test.ZUGFeRDTest/Form1.vb index 681efe1e..fe13417e 100644 --- a/GUIs.Test.ZUGFeRDTest/Form1.vb +++ b/GUIs.Test.ZUGFeRDTest/Form1.vb @@ -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)