ZUGFeRDTest: Add direct validation
This commit is contained in:
parent
e90af16932
commit
07c44d69c4
@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<configSections>
|
<configSections>
|
||||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<section name="ZUGFeRDTest.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
<section name="ZUGFeRDTest.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||||
</sectionGroup>
|
</sectionGroup>
|
||||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<section name="ZUGFeRDTest.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
<section name="ZUGFeRDTest.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
</sectionGroup>
|
</sectionGroup>
|
||||||
</configSections>
|
</configSections>
|
||||||
@ -31,4 +31,72 @@
|
|||||||
</setting>
|
</setting>
|
||||||
</ZUGFeRDTest.My.MySettings>
|
</ZUGFeRDTest.My.MySettings>
|
||||||
</userSettings>
|
</userSettings>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="IKVM.Runtime" publicKeyToken="13235d27fcbfff58" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.1.5717.0" newVersion="8.1.5717.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="IKVM.OpenJDK.Core" publicKeyToken="13235d27fcbfff58" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.1.5717.0" newVersion="8.1.5717.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="IKVM.OpenJDK.XML.API" publicKeyToken="13235d27fcbfff58" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.1.5717.0" newVersion="8.1.5717.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="IKVM.OpenJDK.Util" publicKeyToken="13235d27fcbfff58" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.1.5717.0" newVersion="8.1.5717.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="IKVM.OpenJDK.Text" publicKeyToken="13235d27fcbfff58" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.1.5717.0" newVersion="8.1.5717.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="IKVM.OpenJDK.SwingAWT" publicKeyToken="13235d27fcbfff58" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.1.5717.0" newVersion="8.1.5717.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="IKVM.OpenJDK.Security" publicKeyToken="13235d27fcbfff58" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.1.5717.0" newVersion="8.1.5717.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="IKVM.OpenJDK.Beans" publicKeyToken="13235d27fcbfff58" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.1.5717.0" newVersion="8.1.5717.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="IKVM.OpenJDK.Media" publicKeyToken="13235d27fcbfff58" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.1.5717.0" newVersion="8.1.5717.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="IKVM.OpenJDK.XML.Bind" publicKeyToken="13235d27fcbfff58" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.1.5717.0" newVersion="8.1.5717.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="IKVM.OpenJDK.Jdbc" publicKeyToken="13235d27fcbfff58" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.1.5717.0" newVersion="8.1.5717.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="itext.kernel" publicKeyToken="8354ae6d2174ddca" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-7.1.4.0" newVersion="7.1.4.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="itext.pdfa" publicKeyToken="8354ae6d2174ddca" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-7.1.4.0" newVersion="7.1.4.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="itext.io" publicKeyToken="8354ae6d2174ddca" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-7.1.4.0" newVersion="7.1.4.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
||||||
16
ZUGFeRDTest/Form1.Designer.vb
generated
16
ZUGFeRDTest/Form1.Designer.vb
generated
@ -25,6 +25,7 @@ Partial Class Form1
|
|||||||
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
|
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
|
||||||
Me.Button1 = New System.Windows.Forms.Button()
|
Me.Button1 = New System.Windows.Forms.Button()
|
||||||
Me.ListBox1 = New System.Windows.Forms.ListBox()
|
Me.ListBox1 = New System.Windows.Forms.ListBox()
|
||||||
|
Me.Button2 = New System.Windows.Forms.Button()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'OpenFileDialog1
|
'OpenFileDialog1
|
||||||
@ -35,9 +36,9 @@ Partial Class Form1
|
|||||||
'
|
'
|
||||||
Me.Button1.Location = New System.Drawing.Point(12, 12)
|
Me.Button1.Location = New System.Drawing.Point(12, 12)
|
||||||
Me.Button1.Name = "Button1"
|
Me.Button1.Name = "Button1"
|
||||||
Me.Button1.Size = New System.Drawing.Size(75, 23)
|
Me.Button1.Size = New System.Drawing.Size(221, 23)
|
||||||
Me.Button1.TabIndex = 0
|
Me.Button1.TabIndex = 0
|
||||||
Me.Button1.Text = "Button1"
|
Me.Button1.Text = "Run Job"
|
||||||
Me.Button1.UseVisualStyleBackColor = True
|
Me.Button1.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'ListBox1
|
'ListBox1
|
||||||
@ -48,11 +49,21 @@ Partial Class Form1
|
|||||||
Me.ListBox1.Size = New System.Drawing.Size(526, 407)
|
Me.ListBox1.Size = New System.Drawing.Size(526, 407)
|
||||||
Me.ListBox1.TabIndex = 1
|
Me.ListBox1.TabIndex = 1
|
||||||
'
|
'
|
||||||
|
'Button2
|
||||||
|
'
|
||||||
|
Me.Button2.Location = New System.Drawing.Point(12, 41)
|
||||||
|
Me.Button2.Name = "Button2"
|
||||||
|
Me.Button2.Size = New System.Drawing.Size(221, 23)
|
||||||
|
Me.Button2.TabIndex = 2
|
||||||
|
Me.Button2.Text = "Validate Single File"
|
||||||
|
Me.Button2.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
'Form1
|
'Form1
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.ClientSize = New System.Drawing.Size(916, 435)
|
Me.ClientSize = New System.Drawing.Size(916, 435)
|
||||||
|
Me.Controls.Add(Me.Button2)
|
||||||
Me.Controls.Add(Me.ListBox1)
|
Me.Controls.Add(Me.ListBox1)
|
||||||
Me.Controls.Add(Me.Button1)
|
Me.Controls.Add(Me.Button1)
|
||||||
Me.Name = "Form1"
|
Me.Name = "Form1"
|
||||||
@ -64,4 +75,5 @@ Partial Class Form1
|
|||||||
Friend WithEvents OpenFileDialog1 As OpenFileDialog
|
Friend WithEvents OpenFileDialog1 As OpenFileDialog
|
||||||
Friend WithEvents Button1 As Button
|
Friend WithEvents Button1 As Button
|
||||||
Friend WithEvents ListBox1 As ListBox
|
Friend WithEvents ListBox1 As ListBox
|
||||||
|
Friend WithEvents Button2 As Button
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@ -11,6 +11,7 @@ Imports DigitalData.Modules.Logging
|
|||||||
Public Class Form1
|
Public Class Form1
|
||||||
Private _logConfig As LogConfig
|
Private _logConfig As LogConfig
|
||||||
Private _firebird As Firebird
|
Private _firebird As Firebird
|
||||||
|
Private _zugferd As ZUGFeRDInterface
|
||||||
|
|
||||||
Private PropertyMap As New Dictionary(Of String, XmlItemProperty)
|
Private PropertyMap As New Dictionary(Of String, XmlItemProperty)
|
||||||
|
|
||||||
@ -19,6 +20,8 @@ Public Class Form1
|
|||||||
_logConfig = New LogConfig(LogConfig.PathType.CurrentDirectory)
|
_logConfig = New LogConfig(LogConfig.PathType.CurrentDirectory)
|
||||||
_logConfig.Debug = True
|
_logConfig.Debug = True
|
||||||
_firebird = New Firebird(_logConfig, My.Settings.FB_DATASOURCE, My.Settings.FB_DATABASE, My.Settings.FB_USER, My.Settings.FB_PASS)
|
_firebird = New Firebird(_logConfig, My.Settings.FB_DATASOURCE, My.Settings.FB_DATABASE, My.Settings.FB_USER, My.Settings.FB_PASS)
|
||||||
|
|
||||||
|
_zugferd = New ZUGFeRDInterface(_logConfig)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function LoadFolderConfig(args As WorkerArgs)
|
Private Function LoadFolderConfig(args As WorkerArgs)
|
||||||
@ -78,4 +81,12 @@ Public Class Form1
|
|||||||
|
|
||||||
job.Start(args)
|
job.Start(args)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||||
|
Dim oResult = OpenFileDialog1.ShowDialog()
|
||||||
|
|
||||||
|
If oResult = DialogResult.OK Then
|
||||||
|
_zugferd.ValidateZUGFeRDFile(OpenFileDialog1.FileName)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user