From 2e57e079b0ede16a35c63d0ad08583de8dca8a95 Mon Sep 17 00:00:00 2001 From: Developer01 Date: Wed, 1 Oct 2025 15:20:16 +0200 Subject: [PATCH] DocView Anpassungen - Vorbereitung Update .NEt8 --- .../DocumentViewer.Designer.vb | 38 +- Controls.DocumentViewer/DocumentViewer.resx | 3 + Controls.DocumentViewer/DocumentViewer.vb | 5 +- .../GDPicture_NewPDF_net48.vbproj | 3 - GDPicture_NewPDF_net48/packages.config | 3 - GUIs.Test.ZUGFeRDTest/App.config | 24 + GUIs.Test.ZUGFeRDTest/Form1.Designer.vb | 466 ++++++++++-------- GUIs.Test.ZUGFeRDTest/Form1.resx | 57 ++- GUIs.Test.ZUGFeRDTest/Form1.vb | 21 +- .../My Project/AssemblyInfo.vb | 26 - .../My Project/Settings.settings | 4 +- GUIs.Test.ZUGFeRDTest/Program.cs | 21 + GUIs.Test.ZUGFeRDTest/ZUGFeRDTest.vbproj | 303 ++---------- 13 files changed, 418 insertions(+), 556 deletions(-) create mode 100644 GUIs.Test.ZUGFeRDTest/Program.cs diff --git a/Controls.DocumentViewer/DocumentViewer.Designer.vb b/Controls.DocumentViewer/DocumentViewer.Designer.vb index d835097a..e08d99f5 100644 --- a/Controls.DocumentViewer/DocumentViewer.Designer.vb +++ b/Controls.DocumentViewer/DocumentViewer.Designer.vb @@ -64,6 +64,7 @@ Partial Class DocumentViewer Me.PrintDocument1 = New System.Drawing.Printing.PrintDocument() Me.lbFileNotLoaded = New DevExpress.XtraEditors.LabelControl() Me.RichEditControl1 = New DevExpress.XtraRichEdit.RichEditControl() + Me.lblInfo = New System.Windows.Forms.Label() CType(Me.BarManager1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RepositoryItemTextEdit2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RepositoryItemTextEdit3, System.ComponentModel.ISupportInitialize).BeginInit() @@ -140,7 +141,7 @@ Partial Class DocumentViewer Me.GdViewer.ScrollLargeChange = CType(50, Short) Me.GdViewer.ScrollSmallChange = CType(1, Short) Me.GdViewer.SilentMode = True - Me.GdViewer.Size = New System.Drawing.Size(1012, 557) + Me.GdViewer.Size = New System.Drawing.Size(841, 522) Me.GdViewer.TabIndex = 0 Me.GdViewer.TabStop = False Me.GdViewer.ViewRotation = System.Drawing.RotateFlipType.RotateNoneFlipNone @@ -354,15 +355,15 @@ Partial Class DocumentViewer Me.barDockControlTop.Dock = System.Windows.Forms.DockStyle.Top Me.barDockControlTop.Location = New System.Drawing.Point(0, 0) Me.barDockControlTop.Manager = Me.BarManager1 - Me.barDockControlTop.Size = New System.Drawing.Size(1012, 33) + Me.barDockControlTop.Size = New System.Drawing.Size(841, 33) ' 'barDockControlBottom ' Me.barDockControlBottom.CausesValidation = False Me.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom - Me.barDockControlBottom.Location = New System.Drawing.Point(0, 590) + Me.barDockControlBottom.Location = New System.Drawing.Point(0, 555) Me.barDockControlBottom.Manager = Me.BarManager1 - Me.barDockControlBottom.Size = New System.Drawing.Size(1012, 0) + Me.barDockControlBottom.Size = New System.Drawing.Size(841, 0) ' 'barDockControlLeft ' @@ -370,15 +371,15 @@ Partial Class DocumentViewer Me.barDockControlLeft.Dock = System.Windows.Forms.DockStyle.Left Me.barDockControlLeft.Location = New System.Drawing.Point(0, 33) Me.barDockControlLeft.Manager = Me.BarManager1 - Me.barDockControlLeft.Size = New System.Drawing.Size(0, 557) + Me.barDockControlLeft.Size = New System.Drawing.Size(0, 522) ' 'barDockControlRight ' Me.barDockControlRight.CausesValidation = False Me.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right - Me.barDockControlRight.Location = New System.Drawing.Point(1012, 33) + Me.barDockControlRight.Location = New System.Drawing.Point(841, 33) Me.barDockControlRight.Manager = Me.BarManager1 - Me.barDockControlRight.Size = New System.Drawing.Size(0, 557) + Me.barDockControlRight.Size = New System.Drawing.Size(0, 522) ' 'BarStaticItem1 ' @@ -422,7 +423,7 @@ Partial Class DocumentViewer ' 'SpreadsheetControl1 ' - Me.SpreadsheetControl1.Location = New System.Drawing.Point(147, 190) + Me.SpreadsheetControl1.Location = New System.Drawing.Point(31, 152) Me.SpreadsheetControl1.MenuManager = Me.BarManager1 Me.SpreadsheetControl1.Name = "SpreadsheetControl1" Me.SpreadsheetControl1.ReadOnly = True @@ -445,7 +446,7 @@ Partial Class DocumentViewer Me.lbFileNotLoaded.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None Me.lbFileNotLoaded.Location = New System.Drawing.Point(3, 74) Me.lbFileNotLoaded.Name = "lbFileNotLoaded" - Me.lbFileNotLoaded.Size = New System.Drawing.Size(1006, 72) + Me.lbFileNotLoaded.Size = New System.Drawing.Size(835, 72) Me.lbFileNotLoaded.TabIndex = 0 Me.lbFileNotLoaded.Tag = "" Me.lbFileNotLoaded.Text = "Die Datei konnte nicht geladen werden" @@ -453,17 +454,31 @@ Partial Class DocumentViewer ' 'RichEditControl1 ' - Me.RichEditControl1.Location = New System.Drawing.Point(571, 238) + Me.RichEditControl1.Location = New System.Drawing.Point(395, 238) Me.RichEditControl1.MenuManager = Me.BarManager1 Me.RichEditControl1.Name = "RichEditControl1" Me.RichEditControl1.Size = New System.Drawing.Size(400, 200) Me.RichEditControl1.TabIndex = 5 Me.RichEditControl1.Visible = False ' + 'lblInfo + ' + Me.lblInfo.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.lblInfo.AutoSize = True + Me.lblInfo.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblInfo.ForeColor = System.Drawing.Color.Red + Me.lblInfo.Location = New System.Drawing.Point(3, 533) + Me.lblInfo.Name = "lblInfo" + Me.lblInfo.Size = New System.Drawing.Size(47, 15) + Me.lblInfo.TabIndex = 10 + Me.lblInfo.Text = "Infotext" + ' 'DocumentViewer ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.BackColor = System.Drawing.SystemColors.ControlLightLight + Me.Controls.Add(Me.lblInfo) Me.Controls.Add(Me.RichEditControl1) Me.Controls.Add(Me.lbFileNotLoaded) Me.Controls.Add(Me.SpreadsheetControl1) @@ -473,7 +488,7 @@ Partial Class DocumentViewer Me.Controls.Add(Me.barDockControlBottom) Me.Controls.Add(Me.barDockControlTop) Me.Name = "DocumentViewer" - Me.Size = New System.Drawing.Size(1012, 590) + Me.Size = New System.Drawing.Size(841, 555) CType(Me.BarManager1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RepositoryItemTextEdit2, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RepositoryItemTextEdit3, System.ComponentModel.ISupportInitialize).EndInit() @@ -526,4 +541,5 @@ Partial Class DocumentViewer Friend WithEvents btnSearch As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnSearch2 As DevExpress.XtraBars.BarButtonItem Friend WithEvents RichEditControl1 As DevExpress.XtraRichEdit.RichEditControl + Friend WithEvents lblInfo As Label End Class diff --git a/Controls.DocumentViewer/DocumentViewer.resx b/Controls.DocumentViewer/DocumentViewer.resx index 6c91d499..35b2f2dc 100644 --- a/Controls.DocumentViewer/DocumentViewer.resx +++ b/Controls.DocumentViewer/DocumentViewer.resx @@ -123,6 +123,9 @@ 285, 22 + + 25 + diff --git a/Controls.DocumentViewer/DocumentViewer.vb b/Controls.DocumentViewer/DocumentViewer.vb index f6c77975..89d0633b 100644 --- a/Controls.DocumentViewer/DocumentViewer.vb +++ b/Controls.DocumentViewer/DocumentViewer.vb @@ -468,6 +468,7 @@ Public Class DocumentViewer End Sub Private Function DoLoadFile(FilePath As String, Optional ViewOverride As String = "") As Boolean Try + lblInfo.Visible = False Dim oFileInfo = New FileInfo(FilePath) Dim oExtension As String = oFileInfo.Extension.ToUpper @@ -486,8 +487,8 @@ Public Class DocumentViewer RichEditControl1.Dock = DockStyle.Fill _ViewOverride = "Richtext" _ViewerMode = ViewerMode.Richtext - MsgBox("This docx-file contains a generic error and will be displayed in a reduced viewer." & vbNewLine & - "Please try to open the file in WORD", MsgBoxStyle.Exclamation, "Error opening docx-file") + lblInfo.Visible = True + lblInfo.Text = "This docx-file contains a generic error and will be displayed in a reduced viewer. Please try to open the file in WORD" Else _ViewOverride = "" Select Case oExtension.ToUpper diff --git a/GDPicture_NewPDF_net48/GDPicture_NewPDF_net48.vbproj b/GDPicture_NewPDF_net48/GDPicture_NewPDF_net48.vbproj index 0df123cf..60f96ab6 100644 --- a/GDPicture_NewPDF_net48/GDPicture_NewPDF_net48.vbproj +++ b/GDPicture_NewPDF_net48/GDPicture_NewPDF_net48.vbproj @@ -151,9 +151,6 @@ - - ..\packages\System.Data.SqlClient.4.8.6\lib\net461\System.Data.SqlClient.dll - diff --git a/GDPicture_NewPDF_net48/packages.config b/GDPicture_NewPDF_net48/packages.config index 8e3163f9..1b23f530 100644 --- a/GDPicture_NewPDF_net48/packages.config +++ b/GDPicture_NewPDF_net48/packages.config @@ -3,7 +3,6 @@ - @@ -12,7 +11,6 @@ - @@ -20,7 +18,6 @@ - diff --git a/GUIs.Test.ZUGFeRDTest/App.config b/GUIs.Test.ZUGFeRDTest/App.config index 48a52e0d..d5a18172 100644 --- a/GUIs.Test.ZUGFeRDTest/App.config +++ b/GUIs.Test.ZUGFeRDTest/App.config @@ -2,9 +2,11 @@ +
+
@@ -12,6 +14,14 @@ + + + 172.24.12.50:E:\DataFiles\Firebird\WISAG\EDMI_MASTER.FDB + + + 172.24.12.50 + + 172.24.12.50:E:\DataFiles\Firebird\WISAG\EDMI_MASTER.FDB @@ -22,6 +32,20 @@ + + + sysdba + + + dd + + + + + + Server=SDD-VMP04-SQL17\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;TrustServerCertificate=true; + + sysdba diff --git a/GUIs.Test.ZUGFeRDTest/Form1.Designer.vb b/GUIs.Test.ZUGFeRDTest/Form1.Designer.vb index 5c3c6b11..b68b9537 100644 --- a/GUIs.Test.ZUGFeRDTest/Form1.Designer.vb +++ b/GUIs.Test.ZUGFeRDTest/Form1.Designer.vb @@ -1,4 +1,6 @@ - +Imports System.Windows.Forms + + Partial Class Form1 Inherits System.Windows.Forms.Form @@ -22,216 +24,256 @@ Partial Class Form1 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. Private Sub InitializeComponent() - Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog() - Me.btRunJob = New System.Windows.Forms.Button() - Me.ListBox1 = New System.Windows.Forms.ListBox() - Me.btValidateSerializePDF = New System.Windows.Forms.Button() - Me.btValidateSerializeParseProps = New System.Windows.Forms.Button() - Me.btCreateMD5Checksum = New System.Windows.Forms.Button() - Me.GroupBox1 = New System.Windows.Forms.GroupBox() - Me.ButtonValidateXMLOnly = New System.Windows.Forms.Button() - Me.GroupBox2 = New System.Windows.Forms.GroupBox() - Me.btExtractPDFAttachments = New System.Windows.Forms.Button() - Me.GroupBox3 = New System.Windows.Forms.GroupBox() - Me.txtMD5Checksum = New System.Windows.Forms.TextBox() - Me.txtPropName = New System.Windows.Forms.TextBox() - Me.GroupBox4 = New System.Windows.Forms.GroupBox() - Me.btFindExtractXMLValue = New System.Windows.Forms.Button() - Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog() - Me.GroupBox5 = New System.Windows.Forms.GroupBox() - Me.btWriteBinary = New System.Windows.Forms.Button() - Me.OpenFileDialog2 = New System.Windows.Forms.OpenFileDialog() - Me.GroupBox1.SuspendLayout() - Me.GroupBox2.SuspendLayout() - Me.GroupBox3.SuspendLayout() - Me.GroupBox4.SuspendLayout() - Me.GroupBox5.SuspendLayout() - Me.SuspendLayout() - ' - 'OpenFileDialog1 - ' - Me.OpenFileDialog1.FileName = "OpenFileDialog1" - ' - 'btRunJob - ' - Me.btRunJob.Location = New System.Drawing.Point(6, 19) - Me.btRunJob.Name = "btRunJob" - Me.btRunJob.Size = New System.Drawing.Size(221, 23) - Me.btRunJob.TabIndex = 0 - Me.btRunJob.Text = "Run Job" - Me.btRunJob.UseVisualStyleBackColor = True - ' - 'ListBox1 - ' - Me.ListBox1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ListBox1.FormattingEnabled = True - Me.ListBox1.Location = New System.Drawing.Point(378, 8) - Me.ListBox1.Name = "ListBox1" - Me.ListBox1.Size = New System.Drawing.Size(532, 602) - Me.ListBox1.TabIndex = 1 - ' - 'btValidateSerializePDF - ' - Me.btValidateSerializePDF.Location = New System.Drawing.Point(6, 19) - Me.btValidateSerializePDF.Name = "btValidateSerializePDF" - Me.btValidateSerializePDF.Size = New System.Drawing.Size(246, 23) - Me.btValidateSerializePDF.TabIndex = 2 - Me.btValidateSerializePDF.Text = "Validate and Serialize PDF" - Me.btValidateSerializePDF.UseVisualStyleBackColor = True - ' - 'btValidateSerializeParseProps - ' - Me.btValidateSerializeParseProps.Location = New System.Drawing.Point(6, 48) - Me.btValidateSerializeParseProps.Name = "btValidateSerializeParseProps" - Me.btValidateSerializeParseProps.Size = New System.Drawing.Size(246, 23) - Me.btValidateSerializeParseProps.TabIndex = 3 - Me.btValidateSerializeParseProps.Text = "Validate and Serialize PDF and Parse Props" - Me.btValidateSerializeParseProps.UseVisualStyleBackColor = True - ' - 'btCreateMD5Checksum - ' - Me.btCreateMD5Checksum.Location = New System.Drawing.Point(6, 19) - Me.btCreateMD5Checksum.Name = "btCreateMD5Checksum" - Me.btCreateMD5Checksum.Size = New System.Drawing.Size(221, 23) - Me.btCreateMD5Checksum.TabIndex = 4 - Me.btCreateMD5Checksum.Text = "Create MD5 Checksum for PDF" - Me.btCreateMD5Checksum.UseVisualStyleBackColor = True - ' - 'GroupBox1 - ' - Me.GroupBox1.Controls.Add(Me.ButtonValidateXMLOnly) - Me.GroupBox1.Controls.Add(Me.btRunJob) - 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 eInvoice Service" - ' - 'ButtonValidateXMLOnly - ' - Me.ButtonValidateXMLOnly.Location = New System.Drawing.Point(6, 48) - Me.ButtonValidateXMLOnly.Name = "ButtonValidateXMLOnly" - Me.ButtonValidateXMLOnly.Size = New System.Drawing.Size(221, 23) - Me.ButtonValidateXMLOnly.TabIndex = 4 - Me.ButtonValidateXMLOnly.Text = "Run XML Job (spez. Configuration)" - Me.ButtonValidateXMLOnly.UseVisualStyleBackColor = True - ' - 'GroupBox2 - ' - Me.GroupBox2.Controls.Add(Me.btValidateSerializePDF) - Me.GroupBox2.Controls.Add(Me.btExtractPDFAttachments) - Me.GroupBox2.Controls.Add(Me.btValidateSerializeParseProps) - Me.GroupBox2.Location = New System.Drawing.Point(12, 110) - Me.GroupBox2.Name = "GroupBox2" - Me.GroupBox2.Size = New System.Drawing.Size(360, 155) - Me.GroupBox2.TabIndex = 8 - Me.GroupBox2.TabStop = False - Me.GroupBox2.Text = "Run Functions on a single file (needs Breakpoint)" - ' - 'btExtractPDFAttachments - ' - Me.btExtractPDFAttachments.Location = New System.Drawing.Point(6, 77) - Me.btExtractPDFAttachments.Name = "btExtractPDFAttachments" - Me.btExtractPDFAttachments.Size = New System.Drawing.Size(246, 23) - Me.btExtractPDFAttachments.TabIndex = 3 - Me.btExtractPDFAttachments.Text = "Extract PDF Attachments" - Me.btExtractPDFAttachments.UseVisualStyleBackColor = True - ' - 'GroupBox3 - ' - Me.GroupBox3.Controls.Add(Me.btCreateMD5Checksum) - Me.GroupBox3.Controls.Add(Me.txtMD5Checksum) - Me.GroupBox3.Location = New System.Drawing.Point(12, 271) - 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" - ' - '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.Location = New System.Drawing.Point(6, 49) - Me.txtMD5Checksum.Name = "txtMD5Checksum" - Me.txtMD5Checksum.Size = New System.Drawing.Size(348, 20) - Me.txtMD5Checksum.TabIndex = 5 - Me.txtMD5Checksum.Text = Global.ZUGFeRDTest.My.MySettings.Default.MD5Cheksum - ' - '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.btFindExtractXMLValue) - Me.GroupBox4.Controls.Add(Me.txtPropName) - Me.GroupBox4.Location = New System.Drawing.Point(12, 362) - 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" - ' - 'btFindExtractXMLValue - ' - Me.btFindExtractXMLValue.Location = New System.Drawing.Point(6, 19) - Me.btFindExtractXMLValue.Name = "btFindExtractXMLValue" - Me.btFindExtractXMLValue.Size = New System.Drawing.Size(221, 23) - Me.btFindExtractXMLValue.TabIndex = 11 - Me.btFindExtractXMLValue.Text = "Find and Extract XML Path Value" - Me.btFindExtractXMLValue.UseVisualStyleBackColor = True - ' - 'GroupBox5 - ' - Me.GroupBox5.Controls.Add(Me.btWriteBinary) - Me.GroupBox5.Location = New System.Drawing.Point(12, 490) - Me.GroupBox5.Name = "GroupBox5" - Me.GroupBox5.Size = New System.Drawing.Size(360, 122) - Me.GroupBox5.TabIndex = 12 - Me.GroupBox5.TabStop = False - Me.GroupBox5.Text = "GroupBox5" - ' - 'btWriteBinary - ' - Me.btWriteBinary.Location = New System.Drawing.Point(6, 19) - Me.btWriteBinary.Name = "btWriteBinary" - Me.btWriteBinary.Size = New System.Drawing.Size(221, 23) - Me.btWriteBinary.TabIndex = 11 - Me.btWriteBinary.Text = "Write Binary to PDF" - Me.btWriteBinary.UseVisualStyleBackColor = True - ' - 'OpenFileDialog2 - ' - Me.OpenFileDialog2.FileName = "OpenFileDialog2" - Me.OpenFileDialog2.Filter = "XML files (*.xml)|*.xml" - ' - 'Form1 - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(916, 633) - Me.Controls.Add(Me.GroupBox5) - Me.Controls.Add(Me.GroupBox4) - Me.Controls.Add(Me.GroupBox3) - Me.Controls.Add(Me.GroupBox2) - Me.Controls.Add(Me.GroupBox1) - Me.Controls.Add(Me.ListBox1) - Me.Name = "Form1" - Me.Text = "E-Invoice-TEST-Tool" - Me.GroupBox1.ResumeLayout(False) - Me.GroupBox2.ResumeLayout(False) - Me.GroupBox3.ResumeLayout(False) - Me.GroupBox3.PerformLayout() - Me.GroupBox4.ResumeLayout(False) - Me.GroupBox4.PerformLayout() - Me.GroupBox5.ResumeLayout(False) - Me.ResumeLayout(False) + OpenFileDialog1 = New OpenFileDialog() + btRunJob = New Button() + ListBox1 = New ListBox() + btValidateSerializePDF = New Button() + btValidateSerializeParseProps = New Button() + btCreateMD5Checksum = New Button() + GroupBox1 = New GroupBox() + ButtonValidateXMLOnly = New Button() + GroupBox2 = New GroupBox() + btExtractPDFAttachments = New Button() + GroupBox3 = New GroupBox() + txtMD5Checksum = New TextBox() + txtPropName = New TextBox() + GroupBox4 = New GroupBox() + btFindExtractXMLValue = New Button() + FolderBrowserDialog1 = New FolderBrowserDialog() + GroupBox5 = New GroupBox() + btWriteBinary = New Button() + OpenFileDialog2 = New OpenFileDialog() + Button1 = New Button() + Button2 = New Button() + GroupBox1.SuspendLayout() + GroupBox2.SuspendLayout() + GroupBox3.SuspendLayout() + GroupBox4.SuspendLayout() + GroupBox5.SuspendLayout() + SuspendLayout() + ' + ' OpenFileDialog1 + ' + OpenFileDialog1.FileName = "OpenFileDialog1" + ' + ' btRunJob + ' + btRunJob.Location = New System.Drawing.Point(8, 29) + btRunJob.Margin = New Padding(4, 5, 4, 5) + btRunJob.Name = "btRunJob" + btRunJob.Size = New System.Drawing.Size(295, 35) + btRunJob.TabIndex = 0 + btRunJob.Text = "Run Job" + btRunJob.UseVisualStyleBackColor = True + ' + ' ListBox1 + ' + ListBox1.Anchor = AnchorStyles.Top Or AnchorStyles.Bottom Or AnchorStyles.Left Or AnchorStyles.Right + ListBox1.FormattingEnabled = True + ListBox1.Location = New System.Drawing.Point(504, 12) + ListBox1.Margin = New Padding(4, 5, 4, 5) + ListBox1.Name = "ListBox1" + ListBox1.Size = New System.Drawing.Size(362, 664) + ListBox1.TabIndex = 1 + ' + ' btValidateSerializePDF + ' + btValidateSerializePDF.Location = New System.Drawing.Point(8, 29) + btValidateSerializePDF.Margin = New Padding(4, 5, 4, 5) + btValidateSerializePDF.Name = "btValidateSerializePDF" + btValidateSerializePDF.Size = New System.Drawing.Size(328, 35) + btValidateSerializePDF.TabIndex = 2 + btValidateSerializePDF.Text = "Validate and Serialize PDF" + btValidateSerializePDF.UseVisualStyleBackColor = True + ' + ' btValidateSerializeParseProps + ' + btValidateSerializeParseProps.Location = New System.Drawing.Point(8, 74) + btValidateSerializeParseProps.Margin = New Padding(4, 5, 4, 5) + btValidateSerializeParseProps.Name = "btValidateSerializeParseProps" + btValidateSerializeParseProps.Size = New System.Drawing.Size(328, 35) + btValidateSerializeParseProps.TabIndex = 3 + btValidateSerializeParseProps.Text = "Validate and Serialize PDF and Parse Props" + btValidateSerializeParseProps.UseVisualStyleBackColor = True + ' + ' btCreateMD5Checksum + ' + btCreateMD5Checksum.Location = New System.Drawing.Point(8, 29) + btCreateMD5Checksum.Margin = New Padding(4, 5, 4, 5) + btCreateMD5Checksum.Name = "btCreateMD5Checksum" + btCreateMD5Checksum.Size = New System.Drawing.Size(295, 35) + btCreateMD5Checksum.TabIndex = 4 + btCreateMD5Checksum.Text = "Create MD5 Checksum for PDF" + btCreateMD5Checksum.UseVisualStyleBackColor = True + ' + ' GroupBox1 + ' + GroupBox1.Controls.Add(ButtonValidateXMLOnly) + GroupBox1.Controls.Add(btRunJob) + GroupBox1.Location = New System.Drawing.Point(16, 18) + GroupBox1.Margin = New Padding(4, 5, 4, 5) + GroupBox1.Name = "GroupBox1" + GroupBox1.Padding = New Padding(4, 5, 4, 5) + GroupBox1.Size = New System.Drawing.Size(319, 116) + GroupBox1.TabIndex = 7 + GroupBox1.TabStop = False + GroupBox1.Text = "Run Job like in eInvoice Service" + ' + ' ButtonValidateXMLOnly + ' + ButtonValidateXMLOnly.Location = New System.Drawing.Point(8, 74) + ButtonValidateXMLOnly.Margin = New Padding(4, 5, 4, 5) + ButtonValidateXMLOnly.Name = "ButtonValidateXMLOnly" + ButtonValidateXMLOnly.Size = New System.Drawing.Size(295, 35) + ButtonValidateXMLOnly.TabIndex = 4 + ButtonValidateXMLOnly.Text = "Run XML Job (spez. Configuration)" + ButtonValidateXMLOnly.UseVisualStyleBackColor = True + ' + ' GroupBox2 + ' + GroupBox2.Controls.Add(btValidateSerializePDF) + GroupBox2.Controls.Add(btExtractPDFAttachments) + GroupBox2.Controls.Add(btValidateSerializeParseProps) + GroupBox2.Location = New System.Drawing.Point(16, 144) + GroupBox2.Margin = New Padding(4, 5, 4, 5) + GroupBox2.Name = "GroupBox2" + GroupBox2.Padding = New Padding(4, 5, 4, 5) + GroupBox2.Size = New System.Drawing.Size(480, 167) + GroupBox2.TabIndex = 8 + GroupBox2.TabStop = False + GroupBox2.Text = "Run Functions on a single file (needs Breakpoint)" + ' + ' btExtractPDFAttachments + ' + btExtractPDFAttachments.Location = New System.Drawing.Point(8, 118) + btExtractPDFAttachments.Margin = New Padding(4, 5, 4, 5) + btExtractPDFAttachments.Name = "btExtractPDFAttachments" + btExtractPDFAttachments.Size = New System.Drawing.Size(328, 35) + btExtractPDFAttachments.TabIndex = 3 + btExtractPDFAttachments.Text = "Extract PDF Attachments" + btExtractPDFAttachments.UseVisualStyleBackColor = True + ' + ' GroupBox3 + ' + GroupBox3.Controls.Add(btCreateMD5Checksum) + GroupBox3.Controls.Add(txtMD5Checksum) + GroupBox3.Location = New System.Drawing.Point(16, 321) + GroupBox3.Margin = New Padding(4, 5, 4, 5) + GroupBox3.Name = "GroupBox3" + GroupBox3.Padding = New Padding(4, 5, 4, 5) + GroupBox3.Size = New System.Drawing.Size(480, 131) + GroupBox3.TabIndex = 9 + GroupBox3.TabStop = False + GroupBox3.Text = "Open PDF and calculate Checksum" + ' + ' txtMD5Checksum + ' + txtMD5Checksum.Location = New System.Drawing.Point(8, 75) + txtMD5Checksum.Margin = New Padding(4, 5, 4, 5) + txtMD5Checksum.Name = "txtMD5Checksum" + txtMD5Checksum.Size = New System.Drawing.Size(463, 27) + txtMD5Checksum.TabIndex = 5 + ' + ' txtPropName + ' + txtPropName.Location = New System.Drawing.Point(8, 74) + txtPropName.Margin = New Padding(4, 5, 4, 5) + txtPropName.Name = "txtPropName" + txtPropName.Size = New System.Drawing.Size(463, 27) + txtPropName.TabIndex = 10 + ' + ' GroupBox4 + ' + GroupBox4.Controls.Add(btFindExtractXMLValue) + GroupBox4.Controls.Add(txtPropName) + GroupBox4.Location = New System.Drawing.Point(16, 462) + GroupBox4.Margin = New Padding(4, 5, 4, 5) + GroupBox4.Name = "GroupBox4" + GroupBox4.Padding = New Padding(4, 5, 4, 5) + GroupBox4.Size = New System.Drawing.Size(480, 117) + GroupBox4.TabIndex = 11 + GroupBox4.TabStop = False + GroupBox4.Text = "GroupBox4" + ' + ' btFindExtractXMLValue + ' + btFindExtractXMLValue.Location = New System.Drawing.Point(8, 29) + btFindExtractXMLValue.Margin = New Padding(4, 5, 4, 5) + btFindExtractXMLValue.Name = "btFindExtractXMLValue" + btFindExtractXMLValue.Size = New System.Drawing.Size(295, 35) + btFindExtractXMLValue.TabIndex = 11 + btFindExtractXMLValue.Text = "Find and Extract XML Path Value" + btFindExtractXMLValue.UseVisualStyleBackColor = True + ' + ' GroupBox5 + ' + GroupBox5.Controls.Add(btWriteBinary) + GroupBox5.Location = New System.Drawing.Point(13, 589) + GroupBox5.Margin = New Padding(4, 5, 4, 5) + GroupBox5.Name = "GroupBox5" + GroupBox5.Padding = New Padding(4, 5, 4, 5) + GroupBox5.Size = New System.Drawing.Size(480, 87) + GroupBox5.TabIndex = 12 + GroupBox5.TabStop = False + GroupBox5.Text = "GroupBox5" + ' + ' btWriteBinary + ' + btWriteBinary.Location = New System.Drawing.Point(8, 29) + btWriteBinary.Margin = New Padding(4, 5, 4, 5) + btWriteBinary.Name = "btWriteBinary" + btWriteBinary.Size = New System.Drawing.Size(295, 35) + btWriteBinary.TabIndex = 11 + btWriteBinary.Text = "Write Binary to PDF" + btWriteBinary.UseVisualStyleBackColor = True + ' + ' OpenFileDialog2 + ' + OpenFileDialog2.FileName = "OpenFileDialog2" + OpenFileDialog2.Filter = "XML files (*.xml)|*.xml" + ' + ' Button1 + ' + Button1.Location = New System.Drawing.Point(361, 47) + Button1.Name = "Button1" + Button1.Size = New System.Drawing.Size(94, 29) + Button1.TabIndex = 5 + Button1.Text = "Log Folder" + Button1.UseVisualStyleBackColor = True + ' + ' Button2 + ' + Button2.Location = New System.Drawing.Point(361, 82) + Button2.Name = "Button2" + Button2.Size = New System.Drawing.Size(94, 29) + Button2.TabIndex = 13 + Button2.Text = "AppFolder" + Button2.UseVisualStyleBackColor = True + ' + ' Form1 + ' + AutoScaleDimensions = New System.Drawing.SizeF(8F, 20F) + AutoScaleMode = AutoScaleMode.Font + ClientSize = New System.Drawing.Size(879, 690) + Controls.Add(Button2) + Controls.Add(Button1) + Controls.Add(GroupBox5) + Controls.Add(GroupBox4) + Controls.Add(GroupBox3) + Controls.Add(GroupBox2) + Controls.Add(GroupBox1) + Controls.Add(ListBox1) + Margin = New Padding(4, 5, 4, 5) + Name = "Form1" + Text = "E-Invoice-TEST-Tool" + GroupBox1.ResumeLayout(False) + GroupBox2.ResumeLayout(False) + GroupBox3.ResumeLayout(False) + GroupBox3.PerformLayout() + GroupBox4.ResumeLayout(False) + GroupBox4.PerformLayout() + GroupBox5.ResumeLayout(False) + ResumeLayout(False) End Sub @@ -254,4 +296,6 @@ Partial Class Form1 Friend WithEvents btWriteBinary As Button Friend WithEvents ButtonValidateXMLOnly As Button Friend WithEvents OpenFileDialog2 As OpenFileDialog + Friend WithEvents Button1 As Button + Friend WithEvents Button2 As Button End Class diff --git a/GUIs.Test.ZUGFeRDTest/Form1.resx b/GUIs.Test.ZUGFeRDTest/Form1.resx index e47e59bf..6ab56a3c 100644 --- a/GUIs.Test.ZUGFeRDTest/Form1.resx +++ b/GUIs.Test.ZUGFeRDTest/Form1.resx @@ -1,17 +1,17 @@  - @@ -126,4 +126,7 @@ 328, 17 + + 25 + \ No newline at end of file diff --git a/GUIs.Test.ZUGFeRDTest/Form1.vb b/GUIs.Test.ZUGFeRDTest/Form1.vb index dd355b4b..f8872e9b 100644 --- a/GUIs.Test.ZUGFeRDTest/Form1.vb +++ b/GUIs.Test.ZUGFeRDTest/Form1.vb @@ -1,6 +1,8 @@ -Imports System.IO +Imports System.Data +Imports System.IO Imports System.Reflection Imports System.Security.Cryptography +Imports System.Windows.Forms Imports DigitalData.Modules.Config Imports DigitalData.Modules.Database Imports DigitalData.Modules.Interfaces @@ -21,11 +23,16 @@ Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load - _logConfig = New LogConfig(LogConfig.PathType.CustomPath, Application.StartupPath & "\Log", Nothing, My.Application.Info.CompanyName, My.Application.Info.ProductName) With { + Dim oLogPath = Path.Combine(Application.StartupPath, "Log") + _logConfig = New LogConfig(LogConfig.PathType.CustomPath, oLogPath, Nothing, My.Application.Info.CompanyName, My.Application.Info.ProductName) With { .Debug = True } _logger = _logConfig.GetLogger() - _mssql = New MSSQLServer(_logConfig, My.Settings.MSSQL_CONNECTIONSTRING) + Dim oCS = My.Settings.MSSQL_CONNECTIONSTRING + If Not oCS.Contains("TrustServerCertificate") Then + oCS += ";TrustServerCertificate=true" + End If + _mssql = New MSSQLServer(_logConfig, oCS) _GDPictureVersion = "11.2024" _GDPictureLizenz = ConfigDbFunct.GetProductLicense("GDPICTURE", _GDPictureVersion, _logConfig, My.Settings.MSSQL_CONNECTIONSTRING) @@ -373,4 +380,12 @@ Public Class Form1 End Select End Function + + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + Process.Start("explorer.exe", _logConfig.LogDirectory) + End Sub + + Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click + Process.Start("explorer.exe", System.Windows.Forms.Application.UserAppDataPath()) + End Sub End Class diff --git a/GUIs.Test.ZUGFeRDTest/My Project/AssemblyInfo.vb b/GUIs.Test.ZUGFeRDTest/My Project/AssemblyInfo.vb index bb5dd90b..c545a7ad 100644 --- a/GUIs.Test.ZUGFeRDTest/My Project/AssemblyInfo.vb +++ b/GUIs.Test.ZUGFeRDTest/My Project/AssemblyInfo.vb @@ -1,35 +1,9 @@ Imports System Imports System.Reflection Imports System.Runtime.InteropServices - -' Allgemeine Informationen über eine Assembly werden über die folgenden -' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, -' die einer Assembly zugeordnet sind. - -' Werte der Assemblyattribute überprüfen - - - - - - 'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird. - -' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: -' -' Hauptversion -' Nebenversion -' Buildnummer -' Revision -' -' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, -' übernehmen, indem Sie "*" eingeben: -' - - - diff --git a/GUIs.Test.ZUGFeRDTest/My Project/Settings.settings b/GUIs.Test.ZUGFeRDTest/My Project/Settings.settings index 4e788b7e..b128f7c1 100644 --- a/GUIs.Test.ZUGFeRDTest/My Project/Settings.settings +++ b/GUIs.Test.ZUGFeRDTest/My Project/Settings.settings @@ -1,5 +1,5 @@  - + @@ -18,7 +18,7 @@ - Server=SDD-VMP04-SQL17\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd + Server=SDD-VMP04-SQL17\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;TrustServerCertificate=true; \ No newline at end of file diff --git a/GUIs.Test.ZUGFeRDTest/Program.cs b/GUIs.Test.ZUGFeRDTest/Program.cs new file mode 100644 index 00000000..3e953e10 --- /dev/null +++ b/GUIs.Test.ZUGFeRDTest/Program.cs @@ -0,0 +1,21 @@ +using CoreWCF.Configuration; +using CoreWCF.Description; + +var builder = WebApplication.CreateBuilder(args); + +// Add CoreWCF services +builder.Services.AddServiceModelServices(); +builder.Services.AddServiceModelMetadata(); +builder.Services.AddSingleton(); + +var app = builder.Build(); + +app.UseServiceModel(builder => +{ + // TODO add here service endpoints and behaviors +}); + +var serviceMetadataBehavior = app.Services.GetRequiredService(); +serviceMetadataBehavior.HttpGetEnabled = true; + +app.Run(); diff --git a/GUIs.Test.ZUGFeRDTest/ZUGFeRDTest.vbproj b/GUIs.Test.ZUGFeRDTest/ZUGFeRDTest.vbproj index a629764e..385bed77 100644 --- a/GUIs.Test.ZUGFeRDTest/ZUGFeRDTest.vbproj +++ b/GUIs.Test.ZUGFeRDTest/ZUGFeRDTest.vbproj @@ -1,290 +1,57 @@ - - - + + - Debug - AnyCPU - {16156434-E471-43F1-8030-76A0DA17CD5A} + ZUGFeRDTest + net8.0-windows WinExe ZUGFeRDTest.My.MyApplication - ZUGFeRDTest - ZUGFeRDTest - 512 WindowsForms - v4.8 - true - - - - - - AnyCPU - true - full - true - true - bin\Debug\ - ZUGFeRDTest.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - AnyCPU - pdbonly - false - true - true - bin\Release\ - ZUGFeRDTest.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On + true + ZUGFeRDTest + Digital Data GmbH + Provides baseclasses, methods and constants for DD Products + 2.0 + 2.0 + $(AssemblyName) + $(AssemblyName) + + + + + + - ..\..\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll + ..\..\DDModules\Config\bin\Debug\net8.0-windows\DigitalData.Modules.Config.dll - ..\..\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll + ..\..\DDModules\Database\bin\Debug\net8.0-windows\DigitalData.Modules.Database.dll - ..\..\DDModules\Interfaces\bin\Debug\DigitalData.Modules.Interfaces.dll + ..\..\DDModules\Interfaces\bin\Debug\net8.0-windows\DigitalData.Modules.Interfaces.dll - ..\..\DDModules\Jobs\bin\Debug\DigitalData.Modules.Jobs.dll + ..\..\DDModules\Jobs\bin\Debug\net8.0-windows\DigitalData.Modules.Jobs.dll - ..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll - - - ..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll - - - ..\packages\DocumentFormat.OpenXml.Framework.3.2.0\lib\net46\DocumentFormat.OpenXml.Framework.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.barcode.1d.writer.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.barcode.2d.writer.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.CAD.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.CAD.DWG.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.Common.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.Document.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.Email.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.HTML.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.Imaging.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.Imaging.Formats.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.Imaging.Formats.Conversion.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.Imaging.Rendering.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.MSOfficeBinary.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.OpenDocument.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.OpenXML.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.OpenXML.Templating.dll + ..\..\DDModules\Logging_.NET8\bin\Debug\net8.0-windows\DigitalData.Modules.Logging.dll - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.PDF.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.RTF.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.SVG.dll - - - ..\packages\GdPicture.14.3.14\lib\net462\GdPicture.NET.14.wia.gateway.dll - True - - - - ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll - - - ..\packages\Newtonsoft.Json.Bson.1.0.2\lib\net45\Newtonsoft.Json.Bson.dll - - - ..\packages\NLog.5.1.0\lib\net46\NLog.dll - - - ..\packages\OpenMcdf.2.4.1\lib\net40\OpenMcdf.dll - - - ..\packages\protobuf-net.3.2.46\lib\net462\protobuf-net.dll - - - ..\packages\protobuf-net.Core.3.2.46\lib\net462\protobuf-net.Core.dll - - - ..\packages\RtfPipe.2.0.7677.4303\lib\net45\RtfPipe.dll - - - - ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll - - - ..\packages\System.CodeDom.8.0.0\lib\net462\System.CodeDom.dll - - - ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll - - - - - ..\packages\System.Data.SqlClient.4.8.6\lib\net461\System.Data.SqlClient.dll - - - - - ..\packages\System.IO.Packaging.8.0.1\lib\net462\System.IO.Packaging.dll - - - - ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll - - - ..\packages\Microsoft.AspNet.WebApi.Client.6.0.0\lib\net45\System.Net.Http.Formatting.dll - - - - ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll - - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - - - - ..\packages\System.Security.Cryptography.Pkcs.8.0.1\lib\net462\System.Security.Cryptography.Pkcs.dll - - - - ..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll - - - ..\packages\System.Text.Json.8.0.5\lib\net462\System.Text.Json.dll - - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll - - - - - - - - - - - - - - - - - - - - - - + - - Form - - - Form1.vb - Form - - - - True - Application.myapp - True - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - Form1.vb - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb + + SettingsSingleFileGenerator + + + SettingsSingleFileGenerator + + + SettingsSingleFileGenerator - + SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - \ No newline at end of file + +