add new test function for nodepaths
This commit is contained in:
parent
274a7134ad
commit
8127760eff
113
GUIs.Test.ZUGFeRDTest/Form1.Designer.vb
generated
113
GUIs.Test.ZUGFeRDTest/Form1.Designer.vb
generated
@ -30,6 +30,16 @@ Partial Class Form1
|
|||||||
Me.Button4 = New System.Windows.Forms.Button()
|
Me.Button4 = New System.Windows.Forms.Button()
|
||||||
Me.txtMD5Checksum = New System.Windows.Forms.TextBox()
|
Me.txtMD5Checksum = New System.Windows.Forms.TextBox()
|
||||||
Me.Button5 = New System.Windows.Forms.Button()
|
Me.Button5 = New System.Windows.Forms.Button()
|
||||||
|
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||||
|
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
|
||||||
|
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
|
||||||
|
Me.txtPropName = New System.Windows.Forms.TextBox()
|
||||||
|
Me.GroupBox4 = New System.Windows.Forms.GroupBox()
|
||||||
|
Me.Button6 = New System.Windows.Forms.Button()
|
||||||
|
Me.GroupBox1.SuspendLayout()
|
||||||
|
Me.GroupBox2.SuspendLayout()
|
||||||
|
Me.GroupBox3.SuspendLayout()
|
||||||
|
Me.GroupBox4.SuspendLayout()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'OpenFileDialog1
|
'OpenFileDialog1
|
||||||
@ -38,7 +48,7 @@ Partial Class Form1
|
|||||||
'
|
'
|
||||||
'Button1
|
'Button1
|
||||||
'
|
'
|
||||||
Me.Button1.Location = New System.Drawing.Point(12, 12)
|
Me.Button1.Location = New System.Drawing.Point(6, 19)
|
||||||
Me.Button1.Name = "Button1"
|
Me.Button1.Name = "Button1"
|
||||||
Me.Button1.Size = New System.Drawing.Size(221, 23)
|
Me.Button1.Size = New System.Drawing.Size(221, 23)
|
||||||
Me.Button1.TabIndex = 0
|
Me.Button1.TabIndex = 0
|
||||||
@ -55,65 +65,128 @@ Partial Class Form1
|
|||||||
'
|
'
|
||||||
'Button2
|
'Button2
|
||||||
'
|
'
|
||||||
Me.Button2.Location = New System.Drawing.Point(12, 122)
|
Me.Button2.Location = New System.Drawing.Point(6, 19)
|
||||||
Me.Button2.Name = "Button2"
|
Me.Button2.Name = "Button2"
|
||||||
Me.Button2.Size = New System.Drawing.Size(221, 23)
|
Me.Button2.Size = New System.Drawing.Size(221, 23)
|
||||||
Me.Button2.TabIndex = 2
|
Me.Button2.TabIndex = 2
|
||||||
Me.Button2.Text = "Validate Single File"
|
Me.Button2.Text = "Validate PDF"
|
||||||
Me.Button2.UseVisualStyleBackColor = True
|
Me.Button2.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'Button3
|
'Button3
|
||||||
'
|
'
|
||||||
Me.Button3.Location = New System.Drawing.Point(12, 151)
|
Me.Button3.Location = New System.Drawing.Point(6, 48)
|
||||||
Me.Button3.Name = "Button3"
|
Me.Button3.Name = "Button3"
|
||||||
Me.Button3.Size = New System.Drawing.Size(221, 23)
|
Me.Button3.Size = New System.Drawing.Size(221, 23)
|
||||||
Me.Button3.TabIndex = 3
|
Me.Button3.TabIndex = 3
|
||||||
Me.Button3.Text = "Load Single File"
|
Me.Button3.Text = "Validate and Serialize PDF"
|
||||||
Me.Button3.UseVisualStyleBackColor = True
|
Me.Button3.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'Button4
|
'Button4
|
||||||
'
|
'
|
||||||
Me.Button4.Location = New System.Drawing.Point(12, 193)
|
Me.Button4.Location = New System.Drawing.Point(6, 19)
|
||||||
Me.Button4.Name = "Button4"
|
Me.Button4.Name = "Button4"
|
||||||
Me.Button4.Size = New System.Drawing.Size(221, 23)
|
Me.Button4.Size = New System.Drawing.Size(221, 23)
|
||||||
Me.Button4.TabIndex = 4
|
Me.Button4.TabIndex = 4
|
||||||
Me.Button4.Text = "MD5Chcksum"
|
Me.Button4.Text = "Create MD5 Checksum for PDF"
|
||||||
Me.Button4.UseVisualStyleBackColor = True
|
Me.Button4.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'txtMD5Checksum
|
'txtMD5Checksum
|
||||||
'
|
'
|
||||||
Me.txtMD5Checksum.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ZUGFeRDTest.My.MySettings.Default, "MD5Cheksum", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
|
Me.txtMD5Checksum.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ZUGFeRDTest.My.MySettings.Default, "MD5Cheksum", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
|
||||||
Me.txtMD5Checksum.Location = New System.Drawing.Point(12, 222)
|
Me.txtMD5Checksum.Location = New System.Drawing.Point(6, 49)
|
||||||
Me.txtMD5Checksum.Name = "txtMD5Checksum"
|
Me.txtMD5Checksum.Name = "txtMD5Checksum"
|
||||||
Me.txtMD5Checksum.Size = New System.Drawing.Size(360, 20)
|
Me.txtMD5Checksum.Size = New System.Drawing.Size(348, 20)
|
||||||
Me.txtMD5Checksum.TabIndex = 5
|
Me.txtMD5Checksum.TabIndex = 5
|
||||||
Me.txtMD5Checksum.Text = Global.ZUGFeRDTest.My.MySettings.Default.MD5Cheksum
|
Me.txtMD5Checksum.Text = Global.ZUGFeRDTest.My.MySettings.Default.MD5Cheksum
|
||||||
'
|
'
|
||||||
'Button5
|
'Button5
|
||||||
'
|
'
|
||||||
Me.Button5.Location = New System.Drawing.Point(12, 41)
|
Me.Button5.Location = New System.Drawing.Point(6, 48)
|
||||||
Me.Button5.Name = "Button5"
|
Me.Button5.Name = "Button5"
|
||||||
Me.Button5.Size = New System.Drawing.Size(221, 23)
|
Me.Button5.Size = New System.Drawing.Size(221, 23)
|
||||||
Me.Button5.TabIndex = 6
|
Me.Button5.TabIndex = 6
|
||||||
Me.Button5.Text = "Open Input Folder"
|
Me.Button5.Text = "Open Input Folder"
|
||||||
Me.Button5.UseVisualStyleBackColor = True
|
Me.Button5.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
|
'GroupBox1
|
||||||
|
'
|
||||||
|
Me.GroupBox1.Controls.Add(Me.Button1)
|
||||||
|
Me.GroupBox1.Controls.Add(Me.Button5)
|
||||||
|
Me.GroupBox1.Location = New System.Drawing.Point(12, 12)
|
||||||
|
Me.GroupBox1.Name = "GroupBox1"
|
||||||
|
Me.GroupBox1.Size = New System.Drawing.Size(360, 92)
|
||||||
|
Me.GroupBox1.TabIndex = 7
|
||||||
|
Me.GroupBox1.TabStop = False
|
||||||
|
Me.GroupBox1.Text = "Run Job like in ZUGFeRD Service"
|
||||||
|
'
|
||||||
|
'GroupBox2
|
||||||
|
'
|
||||||
|
Me.GroupBox2.Controls.Add(Me.Button2)
|
||||||
|
Me.GroupBox2.Controls.Add(Me.Button3)
|
||||||
|
Me.GroupBox2.Location = New System.Drawing.Point(12, 110)
|
||||||
|
Me.GroupBox2.Name = "GroupBox2"
|
||||||
|
Me.GroupBox2.Size = New System.Drawing.Size(360, 90)
|
||||||
|
Me.GroupBox2.TabIndex = 8
|
||||||
|
Me.GroupBox2.TabStop = False
|
||||||
|
Me.GroupBox2.Text = "Run Functions on a single file (needs Breakpoint)"
|
||||||
|
'
|
||||||
|
'GroupBox3
|
||||||
|
'
|
||||||
|
Me.GroupBox3.Controls.Add(Me.Button4)
|
||||||
|
Me.GroupBox3.Controls.Add(Me.txtMD5Checksum)
|
||||||
|
Me.GroupBox3.Location = New System.Drawing.Point(12, 206)
|
||||||
|
Me.GroupBox3.Name = "GroupBox3"
|
||||||
|
Me.GroupBox3.Size = New System.Drawing.Size(360, 85)
|
||||||
|
Me.GroupBox3.TabIndex = 9
|
||||||
|
Me.GroupBox3.TabStop = False
|
||||||
|
Me.GroupBox3.Text = "Open PDF and calculate Checksum"
|
||||||
|
'
|
||||||
|
'txtPropName
|
||||||
|
'
|
||||||
|
Me.txtPropName.Location = New System.Drawing.Point(6, 48)
|
||||||
|
Me.txtPropName.Name = "txtPropName"
|
||||||
|
Me.txtPropName.Size = New System.Drawing.Size(348, 20)
|
||||||
|
Me.txtPropName.TabIndex = 10
|
||||||
|
'
|
||||||
|
'GroupBox4
|
||||||
|
'
|
||||||
|
Me.GroupBox4.Controls.Add(Me.Button6)
|
||||||
|
Me.GroupBox4.Controls.Add(Me.txtPropName)
|
||||||
|
Me.GroupBox4.Location = New System.Drawing.Point(12, 297)
|
||||||
|
Me.GroupBox4.Name = "GroupBox4"
|
||||||
|
Me.GroupBox4.Size = New System.Drawing.Size(360, 122)
|
||||||
|
Me.GroupBox4.TabIndex = 11
|
||||||
|
Me.GroupBox4.TabStop = False
|
||||||
|
Me.GroupBox4.Text = "GroupBox4"
|
||||||
|
'
|
||||||
|
'Button6
|
||||||
|
'
|
||||||
|
Me.Button6.Location = New System.Drawing.Point(6, 19)
|
||||||
|
Me.Button6.Name = "Button6"
|
||||||
|
Me.Button6.Size = New System.Drawing.Size(221, 23)
|
||||||
|
Me.Button6.TabIndex = 11
|
||||||
|
Me.Button6.Text = "Find and Extract XML Path Value"
|
||||||
|
Me.Button6.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.Button5)
|
Me.Controls.Add(Me.GroupBox4)
|
||||||
Me.Controls.Add(Me.txtMD5Checksum)
|
Me.Controls.Add(Me.GroupBox3)
|
||||||
Me.Controls.Add(Me.Button4)
|
Me.Controls.Add(Me.GroupBox2)
|
||||||
Me.Controls.Add(Me.Button3)
|
Me.Controls.Add(Me.GroupBox1)
|
||||||
Me.Controls.Add(Me.Button2)
|
|
||||||
Me.Controls.Add(Me.ListBox1)
|
Me.Controls.Add(Me.ListBox1)
|
||||||
Me.Controls.Add(Me.Button1)
|
|
||||||
Me.Name = "Form1"
|
Me.Name = "Form1"
|
||||||
Me.Text = "Form1"
|
Me.Text = "Form1"
|
||||||
|
Me.GroupBox1.ResumeLayout(False)
|
||||||
|
Me.GroupBox2.ResumeLayout(False)
|
||||||
|
Me.GroupBox3.ResumeLayout(False)
|
||||||
|
Me.GroupBox3.PerformLayout()
|
||||||
|
Me.GroupBox4.ResumeLayout(False)
|
||||||
|
Me.GroupBox4.PerformLayout()
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
Me.PerformLayout()
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@ -125,4 +198,10 @@ Partial Class Form1
|
|||||||
Friend WithEvents Button4 As Button
|
Friend WithEvents Button4 As Button
|
||||||
Friend WithEvents txtMD5Checksum As TextBox
|
Friend WithEvents txtMD5Checksum As TextBox
|
||||||
Friend WithEvents Button5 As Button
|
Friend WithEvents Button5 As Button
|
||||||
|
Friend WithEvents GroupBox1 As GroupBox
|
||||||
|
Friend WithEvents GroupBox2 As GroupBox
|
||||||
|
Friend WithEvents GroupBox3 As GroupBox
|
||||||
|
Friend WithEvents txtPropName As TextBox
|
||||||
|
Friend WithEvents GroupBox4 As GroupBox
|
||||||
|
Friend WithEvents Button6 As Button
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@ -109,7 +109,11 @@ Public Class Form1
|
|||||||
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
|
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
|
||||||
My.Settings.Save()
|
My.Settings.Save()
|
||||||
Dim result = checkMD5(txtMD5Checksum.Text)
|
Dim result = checkMD5(txtMD5Checksum.Text)
|
||||||
MsgBox("Done")
|
If IsNothing(result) Then
|
||||||
|
MsgBox("Could not calculate MD5 Checksum")
|
||||||
|
Else
|
||||||
|
txtMD5Checksum.Text = result
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Public Function checkMD5(ByVal filename As String) As String
|
Public Function checkMD5(ByVal filename As String) As String
|
||||||
Try
|
Try
|
||||||
@ -128,10 +132,29 @@ Public Class Form1
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
|
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
|
||||||
Process.Start("\\dd-sto01\DD-STO01-A2\SharedObjects\Public\Projekte\Test\Import\ZUGFerD\Email_in")
|
Process.Start("\\dd-sto01\DD-STO01-A2\SharedObjects\Public\Projekte\Test\Import\ZUGFerD\Email_in")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
|
||||||
|
Dim oResult = OpenFileDialog1.ShowDialog()
|
||||||
|
|
||||||
|
If oResult = DialogResult.OK Then
|
||||||
|
Dim oDoc = _zugferd.ValidateZUGFeRDFile(OpenFileDialog1.FileName)
|
||||||
|
Dim oZUGFERD As CrossIndustryDocumentType = _zugferd.SerializeZUGFeRDDocument(oDoc)
|
||||||
|
Dim oPropName As String = txtPropName.Text
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim oExtractor = New PropertyValues(_logConfig)
|
||||||
|
Dim oValue As List(Of Object) = oExtractor.GetPropValue(oZUGFERD, oPropName)
|
||||||
|
Dim oFinalValue As List(Of Object) = oExtractor.GetFinalPropValue(oValue)
|
||||||
|
Console.WriteLine()
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message)
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user