17 Commits

Author SHA1 Message Date
Jonathan Jenne
ae12ea21f2 rename EDMIAPI to EDMI.API, Rename IDBService to EDMIService 2020-04-06 13:23:11 +02:00
Jonathan Jenne
124cfde45e add EDMI.File 2020-04-06 13:22:39 +02:00
Jonathan Jenne
c23a608b6a update NLog to 4.7.0 2020-04-06 13:16:19 +02:00
Jonathan Jenne
2fabdb90a5 ZUFeRDRESTService: Dont copy appsettings dev into output directory 2020-03-25 16:09:17 +01:00
Jonathan Jenne
0b36700ba1 ZUGFERDRESTService: Prepare for deployment 2020-03-25 13:57:31 +01:00
Jonathan Jenne
4f75d7eb96 Merge branch 'master' into ZugferdService-Redesign 2020-03-25 13:45:49 +01:00
Jonathan Jenne
a8a9dd84eb LookupGrid: Version 1.0.2.2 2020-03-25 13:45:17 +01:00
Jonathan Jenne
40b8783af4 LookupGrid: Fix F2 not working for multiselect = true 2020-03-25 13:45:01 +01:00
Jonathan Jenne
acaa2e7ad6 zugferdrestapi: Fix missing properties 2020-03-25 13:22:32 +01:00
Jonathan Jenne
5ac28e2032 Interfaces: Version 1.0.1.0 2020-03-25 13:22:09 +01:00
Jonathan Jenne
0e592de288 Interfaces: Extract attachments from stream 2020-03-25 13:21:34 +01:00
Jonathan Jenne
9623ce8191 DocumentViewer: Version 1.0.2.0 2020-03-25 11:42:56 +01:00
Jonathan Jenne
a69712d94c DocumentViewer: Fit-To-Page for RichEditControl 2020-03-25 11:42:26 +01:00
Jonathan Jenne
52149cbeb8 more logging 2020-03-24 10:57:07 +01:00
Jonathan Jenne
c9fdf80936 ZUGFeRDRESTService: Improve Logging 2020-03-23 16:24:39 +01:00
Jonathan Jenne
b5feec77f7 Merge branch 'master' into ZugferdService-Redesign 2020-03-23 12:07:34 +01:00
Jonathan Jenne
8d91dcdb43 DocumentViewer: Version 1.0.1.0 2020-03-23 12:06:51 +01:00
88 changed files with 1749 additions and 344 deletions

View File

@@ -53,14 +53,11 @@ Partial Class DocumentViewer
Me.btnFlipY = New System.Windows.Forms.ToolStripButton() Me.btnFlipY = New System.Windows.Forms.ToolStripButton()
Me.ToolStripSeparator4 = New System.Windows.Forms.ToolStripSeparator() Me.ToolStripSeparator4 = New System.Windows.Forms.ToolStripSeparator()
Me.btnSettings = New System.Windows.Forms.ToolStripButton() Me.btnSettings = New System.Windows.Forms.ToolStripButton()
Me.statusbar = New System.Windows.Forms.StatusStrip()
Me.infoLabel = New System.Windows.Forms.ToolStripStatusLabel()
Me.statusLabel = New System.Windows.Forms.ToolStripStatusLabel()
Me.OpenFileDialog = New System.Windows.Forms.OpenFileDialog() Me.OpenFileDialog = New System.Windows.Forms.OpenFileDialog()
Me.RichEditControl1 = New DevExpress.XtraRichEdit.RichEditControl() Me.RichEditControl1 = New DevExpress.XtraRichEdit.RichEditControl()
Me.SpreadsheetControl1 = New DevExpress.XtraSpreadsheet.SpreadsheetControl() Me.SpreadsheetControl1 = New DevExpress.XtraSpreadsheet.SpreadsheetControl()
Me.PrintDocument1 = New System.Drawing.Printing.PrintDocument()
Me.mainToolStrip.SuspendLayout() Me.mainToolStrip.SuspendLayout()
Me.statusbar.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
'GdViewer 'GdViewer
@@ -126,7 +123,7 @@ Partial Class DocumentViewer
Me.GdViewer.ScrollLargeChange = CType(50, Short) Me.GdViewer.ScrollLargeChange = CType(50, Short)
Me.GdViewer.ScrollSmallChange = CType(1, Short) Me.GdViewer.ScrollSmallChange = CType(1, Short)
Me.GdViewer.SilentMode = True Me.GdViewer.SilentMode = True
Me.GdViewer.Size = New System.Drawing.Size(1015, 537) Me.GdViewer.Size = New System.Drawing.Size(1015, 559)
Me.GdViewer.TabIndex = 0 Me.GdViewer.TabIndex = 0
Me.GdViewer.ViewRotation = System.Drawing.RotateFlipType.RotateNoneFlipNone Me.GdViewer.ViewRotation = System.Drawing.RotateFlipType.RotateNoneFlipNone
Me.GdViewer.Zoom = 1.0R Me.GdViewer.Zoom = 1.0R
@@ -383,28 +380,6 @@ Partial Class DocumentViewer
Me.btnSettings.Size = New System.Drawing.Size(28, 28) Me.btnSettings.Size = New System.Drawing.Size(28, 28)
Me.btnSettings.Text = "Viewer settings" Me.btnSettings.Text = "Viewer settings"
' '
'statusbar
'
Me.statusbar.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.infoLabel, Me.statusLabel})
Me.statusbar.Location = New System.Drawing.Point(0, 568)
Me.statusbar.Name = "statusbar"
Me.statusbar.Size = New System.Drawing.Size(1015, 22)
Me.statusbar.SizingGrip = False
Me.statusbar.TabIndex = 7
Me.statusbar.Text = "StatusStrip1"
'
'infoLabel
'
Me.infoLabel.Name = "infoLabel"
Me.infoLabel.Size = New System.Drawing.Size(56, 17)
Me.infoLabel.Text = "infoLabel"
'
'statusLabel
'
Me.statusLabel.Name = "statusLabel"
Me.statusLabel.Size = New System.Drawing.Size(66, 17)
Me.statusLabel.Text = "statusLabel"
'
'OpenFileDialog 'OpenFileDialog
' '
Me.OpenFileDialog.FileName = "OpenFileDialog1" Me.OpenFileDialog.FileName = "OpenFileDialog1"
@@ -438,14 +413,11 @@ Partial Class DocumentViewer
Me.Controls.Add(Me.SpreadsheetControl1) Me.Controls.Add(Me.SpreadsheetControl1)
Me.Controls.Add(Me.RichEditControl1) Me.Controls.Add(Me.RichEditControl1)
Me.Controls.Add(Me.GdViewer) Me.Controls.Add(Me.GdViewer)
Me.Controls.Add(Me.statusbar)
Me.Controls.Add(Me.mainToolStrip) Me.Controls.Add(Me.mainToolStrip)
Me.Name = "DocumentViewer" Me.Name = "DocumentViewer"
Me.Size = New System.Drawing.Size(1015, 590) Me.Size = New System.Drawing.Size(1015, 590)
Me.mainToolStrip.ResumeLayout(False) Me.mainToolStrip.ResumeLayout(False)
Me.mainToolStrip.PerformLayout() Me.mainToolStrip.PerformLayout()
Me.statusbar.ResumeLayout(False)
Me.statusbar.PerformLayout()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
@@ -481,10 +453,8 @@ Partial Class DocumentViewer
Friend WithEvents btnFlipY As ToolStripButton Friend WithEvents btnFlipY As ToolStripButton
Friend WithEvents ToolStripSeparator4 As ToolStripSeparator Friend WithEvents ToolStripSeparator4 As ToolStripSeparator
Friend WithEvents btnSettings As ToolStripButton Friend WithEvents btnSettings As ToolStripButton
Friend WithEvents statusbar As StatusStrip
Friend WithEvents infoLabel As ToolStripStatusLabel
Friend WithEvents statusLabel As ToolStripStatusLabel
Friend WithEvents OpenFileDialog As OpenFileDialog Friend WithEvents OpenFileDialog As OpenFileDialog
Friend WithEvents RichEditControl1 As DevExpress.XtraRichEdit.RichEditControl Friend WithEvents RichEditControl1 As DevExpress.XtraRichEdit.RichEditControl
Friend WithEvents SpreadsheetControl1 As DevExpress.XtraSpreadsheet.SpreadsheetControl Friend WithEvents SpreadsheetControl1 As DevExpress.XtraSpreadsheet.SpreadsheetControl
Friend WithEvents PrintDocument1 As Printing.PrintDocument
End Class End Class

View File

@@ -124,13 +124,13 @@
<data name="btnPrint.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="btnPrint.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFgSURBVEhLvVVBToRAEESNF/+kv+DEgRsPICFwMfMGLwYv YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFhSURBVEhLvVWxToRAEEWNjf+kf0FBRccHkBBozH6CjSHa
evIDs0fjQ0wIB56w0XAQZ+yanXaHQcLsrlhJZao73V3TuxCiOZRlqYgaZ1VVo5OJmGnbwiCEOKcBOhQH aGVvuNL4IRIKvuFyFwpx13l7O96ySNi7E1/ysm8mM/N27iAEU8jzXBIVzqIoBicTMdO0+UEIcU4DlC8O
G2RZdrmugRBXK2/wYDZQSpkB7snkGDjI4Kba6FNox+xB7q9JknzhqRiGQV+XknivUIzT1W7Oj6HBruvM NkiS5HJZAyGuFt7gUW8gpdQD7JPJMXCQwU2xUqfQjNmD3N+jKPrCU9H3vbrOK+K9RDFOW9s5N4YG27bV
05Wm6WdRFM8w+Hn0/tLAzhyMARMGXHgs+T9hrr2BGhn0fa/FnaQGaYp3Znvt5vwYGr1t284bSCl10zQK T1ccx59Zlr3A4OfR+0sDM7PXBkwYcOGx5P+EufQGcmDQdZ0Sd6/UUOnindle2zk3hkZv0zTTBlVVqbqu
t8CqOF3t5vwYGr11XU8N1uRogyXt5vx4Tv/PBkZYQM/dyM358ZzGQJNwyUWh8IeyxtuMD8uGEhMTMBS/ JW6BVXHa2s65MTR6y7IcGyzJwQZz2s658ZT+nw20MICeupGdc+MpjYE6YZOLfOEOZY23GR+WFSVGJqAv
9RIHYm1/mClQxHh6edOPHpFj4Lb4SNnWMLgGSzjZYGkD1MZxfGFbw+Bv4L+5HAPHbrC1/YvI8/yDWs52 fusl9sQH88OMgSLG89uHenKIHAO3xUfKtPrBNpjDyQZzG6A2DMML0+oHdwP3zeUYOHaDtemfRZqmW2o5
nYGgW5FHtcUmC3wn3to2D1H0DRIt3n90sPmTAAAAAElFTkSuQmCC 23V6gm5FHsUam8xwQ7w1bQ6C4BuAm93DSGjZ/gAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="btnFitWidth.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="btnFitWidth.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -154,87 +154,87 @@
<data name="btnMouseMode.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="btnMouseMode.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHBSURBVEhLnZM9LwRRGIU38VVp/AGJUqPQIDMjVH4AnYRK YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHASURBVEhLnZM9LwRRGIU38VVp/AFqjUKDzIxQ+QE0IqHS
IyKEnRGFgtBIRBRKSpYEczcbHwUNCZGlUEtQ0hESwnXPeDeZuGfNrCd5cjP3vefM7uxOphx9fbkqx8/3 iAhhZ0ShIDQSEVFTsiSYuxEfBQ0JkaVQS1DSERLCdc94N5m4Z82sJ3lyM/e958zu7E6mFD09uQrHz/e5
u4EKvay6bxpY+/ACpedzVxprdG32Mcc5nJdoMm1j+w1OVp2h6Lfbp7fWHsR55KTib8ynKrCS3oUjPbdZ gQq9rLpv6F/98AKl53JXGmt0bfYxxzmcl2gyLaP7dU5WnaHot1unt9YexHnkpOJvzKfaYyXd80d6dqMQ
jFY2R04qyuNNKZeF4fPbuwZY2TzS5KWK4/nhCg0a47B5pMlLFceZVBc0aIzD5hB5qeI44+qJBWEcNofI rWyOnFSUxptULgvD57d3DbCyeaTJSxXH88NlGjTGYfNIk5cqjjOhLmjQGIfNIfJSxXHG1BMLwjhsDpGX
SxXH61efLAjjsHmkyUuVTefMcTUNGbun8/r69km/mB8YK67ZOSh1Nq1DlzUsEDe7dk73S3Yapc6mdIOD Ko7Xqz5ZEMZh80iTlyqb9unjShoydk7l9fXtk34xPzBWXLNzUOpsmgcvq1ggbnb1nO4XbTdKnU3xBgeF
4sO/zF/cRTeROhv2DfAoBpZOtL9+rmc3inph6ypacY199qikzibNI0qj1Nk0z+RqWaBSpc6mZ6RQxwKV h3+Zv7iLbiJ1Nuwb4FH0L55of+1cz6wX9PzmVbTiGvvsUUmdTZpHlEaps2mczlWzQLlKnU3X8F4NC5Sr
KnU2P3/T1S8WSu/ql9Rx/nqT05j4JjuBOmTBtCIvVRzXD4dZMK3ISxWnY3K3vj1QjyycJHLIS1V5XH9v 1Nn8/E1XvlgovStfUsf5601OY+Kb7ATqkAXTirxUcVw/HGLBtCIvVZy2iZ3a1kA9snCSyCEvVaVx/d0B
kBUkiZxUJOP6apmVlBPnJZoeNwgnWkZ33lhhScxxTiKV0zWdb3SCcNGU3RhfY95gH3M5SshkvgGoyriE VpAkclKRjOurJVZSSpyXaHrcIBxvGtl+Y4VFMcc5iZRPx1S+3gnCBVN2Y3yNeYN9zOUoIZP5Bl9auHhV
9kg28AAAAABJRU5ErkJggg== DRJiAAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<data name="btnFirstPage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="btnFirstPage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGjSURBVEhLxVTLSsNAFB3UrkVRXLp324VCMgmIfoBIURRx YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGgSURBVEhLxVRLS8NAEF7UnkVRPHr32oNCsgmof0CkKIp4
17WvZKaIxIKIfoIr96LYzBQRXPgDoqCo/yD43PrMTW90mKYxKa0euOTmPs6Ze0mGtAOjJX8A3dYCiCkT 69lXs1tEgiCiP8GTd1FsdksRPPgHREFR/4Pg8+oz005w2KY1Ka1+MGQyj+/bGZJlncB4MRhCt70AYi7U
29Q9eMYQIRaXn6oNzu++Yio17CXRR7nYMrh4ingwRQhl6x9gEIRnFgGzdNRvMrEZ9L7oPFjSnAAQUyY3 LveOXjDEmCP1F7Xhxf03TCWGu6IGuFQ7llTPEQ+mGOPC/wSDIDzTCNjFyqAt1HbY+2ryYElrAkDMhd4a
hpl4VHtVH0uzrcjk1R4gthb2H/Q+3bAl3QQji8e91PXLBqvtWK1v5GNrskB4Yi7XKPPv9brUAhBQLRKw FeqJ9lIfS9OtyJblPiB2lg4fzT7TsCXZBGPLJ/3cCzYtUdsxrW/kY2tzgeqJpd7gIngw6xILQIBaJOBI
uFi1lit3ej6theSAulOMi3fYcV1ce1fjcT7Sxwgk+Or7b/VI/wcCEGiHIf0/TDDE5Vtwp1zq8ayG9PH/ te6slu7NfFKrkgPqTjGhPmDHdXHjncbjfKSPEWji0/ff6pH+DwQg0AlD+n+YYETq9/BOuTLjaQ3p4/+D
wRg76TaYnDAccW7x8vfp1bro2chH+ngBTJFCYa8zuH4ngx/tQq9LLQAB1eKuCts77bJ5tZBlddiaPEEd SXHaawk9ZRXUhSN/Tk/romcjH+njBTDFcrmD7vD6nQ5/tEuzLrEABKjFXRWuf9bjynIuzeqwtfkEdfD9
PK8juPenjBUQ+lld1Kv62JFRAAETma6cNt3Kldqr+liabkWNkC+e5SxXzBjcv9F5sKS5CXSEH4MjZ6kr rvDen7HWQKjWR3upjx0pBRAwke3pWdsrXdNe6mNpshU1QjZ/nnE8NWfJ4NbkwZLWJjBR/RgKep576iZa
rqPVYaq1yBd3cjYXc6ZzeIuh9gBWV/MI+QJHJit3xg14HQAAAABJRU5ErkJggg== Habai2x+L+NKtWAXju8w1BnA6moeY9/IuSrpVj3aVAAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="btnPreviousPage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="btnPreviousPage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHLSURBVEhLY6AZqK9ngrKoC4zTzrDalG0OsS3bdAIqRB1g YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHKSURBVEhLY6AZqK9ngrKoC4zTzrDalG0OsS3bdAIqRB1g
X7+fw7Z8U4pdxeYbQPwfhKFSlAH7/PUCduWbyy1KNz2zLW/4BzIYRIMwVAl5wKlqszTQxZ02RZveIBtK X7+fw7Z8U4pdxeYbQPwfhKFSlAH7/PUCduWbyy1KNz2zLa//BzIYRIMwVAl5wKlqszTQxZ02RZveIBtK
sQU2FVvV7Mo2T7esWPsFFhS4MFQLMeA/o1XpBhOb8k0rtSo2/0F3KS42VDMeAExq9hVbXGzLN+yxdd30 sQU2FVvV7Mo2T7esWPsFFhS4MFQLMeA/o1XpBhOb8k0rtSo2/0F3KS42VDMeAExq9hVbXGzLN+yxdd70
F9kAiiwIDV3FbFuxKdymdPMpO7fNf0GayMFQ4xDAtXgnNzD9ptuVbryJzUXIfGRxXGyosQwMFoU7hIAp F9kAiiwIDV3FbFuxKdymdPMpO5fNf0GayMFQ4xDAtXgnNzD9ptuVbryJzUXIfGRxXGyosQwMFoU7hIAp
ohSIn+LTgMzHpQaZDTbctnxjg23BmnfEaEDmE6MebIFdxZY064rN9+0qGsGS1MRgC0DAI3cbu33Fplib ohSIn+LTgMzHpQaZDTbctnxjg23BmnfEaEDmE6MebIFdxZY064rN9+0qIJLUxGALQMAjdxu7fcWmWJuy
sg2X8bkImY9LDTIbajwCAMsTFpvKTQHAjHQEpJBSDDUWO7Ar3eBoXb5xh3z8/N8wFyG7EEbjY0ONwg/s DZfxuQiZj0sNMhtqPAIAyxMWm8pNAcCMdASkkFIMNRY7sCvd4GhdvnGHfPz83zAXIbsQRuNjQ43CD+zK
yjcY2pRtXGGbteknsgFUswAGgEWFum355qn6+eu/gwwhBkO1kgZsq7ZLgkpRu4qNb7G5GpkN1UIesKnY NxjalG1cYZu16SeyAVSzAAaARYW6bfnmqfr567+DDCEGQ7WSBmyrtkuCSlG7io1vsbkamQ3VQh6wqdgi
ImhbtrESVA/QxAIYABUvoLxkV7LhLshwZAxVQh0ASuK2pZujgbXbWar6AAMAi3ig672sSzcdhIrQCvxn aFu2sRJUD9DEAhgAFS+gvGRXsuEuyHBkDFVCHQBK4ralm6OBtdtZqvoAAwCLeKDrvaxLNx2EitAK/Gdk
ZGBgYAAASTmIRRBkor0AAAAASUVORK5CYII= YGBgAABSZ4fXERBsXgAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="btnNextPage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="btnNextPage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHCSURBVEhLYwCD+nomCINGwLZs0wmbss0hxmlnWKFC1AV2 YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHCSURBVEhLYwCD+nomCINGwLZs0wmbss0hxmlnWKFC1AV2
FZv/Q/EN2/JNKfb1+zmgUtQBtuUN/0AYZAmItijd9MyufHO5ff56AagSygC6BTC2TdGmN0AfdTpVbZaG FZv/Q/EN2/JNKfb1+zmgUtQBtuX1/0AYZAmItijd9MyufHO5ff56AagSygC6BTC2TdGmN0AfdTpVbZaG
KiUPQIMHJ7asWPvFrmzzdJuKrWpQLaQBXD5AZ2tVbP5jU75ppVXpBhMGhv+MUO2EAT5DkdlwMddNf23L KiUPQIMHJ7asWPvFrmzzdJuKrWpQLaQBXD5AZ2tVbP5jU75ppVXpBhMGhv+MUO2EAT5DkdlwMedNf23L
N+yxr9jiQlQSB2kkC7tt/mtTuvmUbcWm8NDQVcxQ4zABuktxsZHF0Pl2pRtvAvNTumvxTm6osQiAVQOp N+yxr9jiQlQSB2kkC7ts/mtTuvmUbcWm8NDQVcxQ4zABuktxsZHF0Pl2pRtvAvNTumvxTm6osQiAVQOp
FsDZm54CcalF4Q4hqPHUtgDKLljzzrZ8YwPYApAAdXHjP+uKzfftKrakgS3A6Qo0NrIYOh/GtinbcNm+ FsDZm54CcalF4Q4hqPHUtgDKLljzzrZ8YwPYApAAdXH9P+uKzfftKrakgS3A6Qo0NrIYOh/GtinbcNm+
YlOsR+42drDhIACSpBiXbT5iU7kpAFiOsUCNRQB8LkJmI4uBsHz8/N/W5Rt32JVucIQahR3ANBBtQdam YlOsR+42drDhIACSpBiXbT5iU7kpAFiOsUCNRQB8LkJmI4uBsHz8/N/W5Rt32JVucIQahR3ANBBtQdam
nzZlG1fYlW8whBqBH4A0EoP189d/ty3fPBVYVKhDtRIH0F2Kyd74FlSq2lZtl4RqIQ1gN3Tzf1C9YFu2 nzZlG1fYlW8whBqBH4A0EoP189d/ty3fPBVYVKhDtRIH0F2Kyd74FlSq2lZtl4RqIQ1gN3Tzf1C9YFu2
sdKmYosgVCl5AGQYCi7ZcBeUhrFme3IA3NXlm8/alm6OxprUKAHWpZsOAl3uRcPWBQmVB0mAgQEA6D+I sdKmYosgVCl5AGQYCi7ZcBeUhrFme3IA3NXlm8/alm6OxprUKAHWpZsOAl3uRcPWBQmVB0mAgQEA5X2H
RTXTAxQAAAAASUVORK5CYII= 142IlcMAAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="btnLastPage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="btnLastPage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFxSURBVEhLY4ABp8qN4lAmbYBt2dqPtuWbOmlmkV3F5v8g YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFwSURBVEhLY4ABp8qN4lAmbYBt2dqPtuWbOmlmkV3F5v8g
bF2x6YNtxaYO+6JNIlApooF8/PzfMHNgGCoF9EF5wz+QAIiGsj/ZlG9qs6ncJgpVQhCALEA3ByqF1QIw bF2x6YNtxaYO+6JNIlApooF8/PzfMHNgGCoF9EF5/T+QAIiGsj/ZlG9qs6ncJgpVQhCALEA3ByqF1QIw
27x803vb8s0txFiE1wKQIF5csOYd2KKKLYJQLRiA1CDCYINo63JgHJVtbLQo3CEE1QoHZAURMhtZzLZ8 27x803vb8s0txFiE1wKQIF5csOYd2KKKLYJQLRiA1CDCYINo63JgHJVtbLQo3CEE1QoHZAURMhtZzLZ8
41vbis21yD6iLIhw4eINr+wqNlWDzKBKEMHE0PngOHLd9BddHGo8FSzAwYYaTwcLQIK0wFDjh4APgGXY 41vbis21yD6iLIhw4eINr+wqNlWDzKBKEMHE0PngOHLe9BddHGo8FSzAwYYaTwcLQIK0wFDjh4APgGXY
Ja2KzX/QxaHGk+uDxn/WpZvOWZdvDnQp381P7Yx2Hli8B4eGrmKGGkGdjAYKCvuKLaH29ftZoFrhgIKM Ja2KzX/QxaHGk+uD+n/WpZvOWZdvDnQp381P7Yx2Hli8B4eGrmKGGkGdjAYKCvuKLaH29ftZoFrhgIKM
BgyKkk2XgPVEOEN9PRNUCwYgK4hsyjZctinbHIHNxeiApCCyrth4za5sU5Rx2hlWqBKCgIggavxnW7bp BgyKkk2XgPVEOEN9PRNUCwYgK4hsyjZctinbHIHNxeiApCCyrth4za5sU5Rx2hlWqBKCgIggAtpatumq
qm3p5mjkyCMW4PWBTen66/YVm2KN02YS7WKSAClBQTxgYAAA96Urd2ptB70AAAAASUVORK5CYII= benmaOTIIxbg9YFN6frr9hWbYo3TZhLtYpIAKUFBPGBgAAB8byrpVSoE5AAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<data name="btnZoomOut.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="btnZoomOut.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAMESURBVEhLtVXfS5NRGA6KLuqiKCSCqIsi6Da69qL+Bm/S YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAMESURBVEhLtVVdS1RRFA2KHuqhKCSCqIci6DV69qF+gy9p
kLmpc2obzoGW22cJgWFhUrJCrbQyqIt+EEqUJUEgOEextDY3bUaUWKlJLbPv9Lz73vN5PqeoSQ+8vufH iDrqfDiNOA5oOXMtQTAsTEos1Eorg3rog1CiLAkC0TGKSaeZUaaMKLFSk5psuqe15+5zPXdGUZMWbPf5
c57nfY9+x3VLweVy7SkqKvIVFhY+Qo4VFxePYxxHPMa8xuFw7Gfq6mCz2bIgcCU3NzcFUZ3C6XQKNXPM WGetvY/e47ql4HQ695SUlPiKi4sfIkdLS0snMR5DPMK8xmaz7Wfq6lBQUJAFgcu5ubkJiOoUdrtdqJlj
Im7CaBcfXR4QPgSR9yS00igoKPiMfJgllgZaP4hqpmSFdJjzjKadGT13sXmsvr7xI80XcqhbFHeEpTJh HnEDRrv46PKA8CGIvCOhlUZhYeFn5MMssTTQ+kFUMyMrpMOc5zStPn72QstEQ0PTR5qnc6hbFHeEpTJR
t9u3gZiQByjKysomnvf2fooND+tCwcjIqB55MyjcbvdPlY8Yh8lulrQCxEYiy/D5fB8ikcgcCSaTSYuB VFS0DcRxeYCirKxs6ll//6e3kYguFIyNjeuhNyPC4/H8VPmISZjsZkkrQGwisgyfz/chFAolSTAej1sM
nMfjcT0YDP5RzyFus+Q8ysvLs+CebptIpaWlkyROQstFIpHQNU0zrys/P/93SUnJAZY2gA0Ht5gm3evq 5Dwajeqtra1/1HOIWyy5ALfbnQX3VNtEcrlc0yROQstFLBbTNU0zrys/P/+3w+E4wNIGsGHjFlOkuz29
HqfD6XIBdUyQc5mjsWGzA9LANWksbQAL7ZIA91/T32csossZ6PhZe+q0aQK9pyxtAIsvZQcVFdUTdDC7 k3Q4VS6gjglyLnMkGjM7IA1ck8bSBrDQKQlw/zX7fc4iupyBjp+1p06bJtB7wtIGsPhCdlBRUT1FB7Or
6oHIrnqIoKyO1TVjTvy26zfMDhBjLG0Ajq+kAe5zgqrKFFvagNB5975q8I2lDWDjhTSoPnFy+l86aL3W 7ovsqgcIyupYXTPmxO+4dt3sADHB0gbg+Eoa4D6nqKpMsaUNCN137qkG31jaADaeS4PqEydn/6WD9qud
bhrge0qytAFstNAmBd6fucmpacu9q2OCnMus45fgD2jp8xxPWNoAFo7KDojQ1d29KoPBoSFTnDRw5TUs pgG+p/csbQAbbbRJgfcnOT0za7l3dUyQc5l1/BL8AS11nuMxSxvAwlHZARF6entXZTAyOmqKkwauvIal
bQALW7D5RZI8Hs9cKBRakUEqlRJ1dXWmAWIWt7CPpecB54DsgLLf79fD4fCiH5eMaDSqNzU1mZVz7mBJ DWBhCza/SFJ5eXlycHBwRQaJRELU1dWZBoh53MI+ll4AnAOyA8p+v18PBoOLflwywuGw3tzcbFbOuYsl
K9DFJvprkmQKr9crenqeibfvopYO4vh6+0MDIhAImOLSAL/gPrwE21nWCmzuBYleS7VlcdztFvVnG8Sl rUAXm+ivSZIpvF6v6Ot7iisIWzqI4usdCg6LQCBgiksD/IIH8BJsZ1krsLkXJHot1ZbFcY9HNJxpFBcv
yy2i4fwF4a2spA/SwlEDhfbT48myVpAJdSIrUquTIdcW48gxdAboHxfLWpGXl7cZpFoQvi48rIqgyh/I tYnGc+eFt7KSPkgLRw0UOkSPJ8taQSbUiaxIrU6GXFuMI8fQGaZ/XCxrRV5e3maQakH4mn5YFUGVP5Bb
zRC7s3CPx2FwdrBsJvDebwXxGIhtyPScRJD70GEnxi4I7yReTk7ORqzfItFF4nVabK2AyXqYdiAyrosp IHY7fY/HL8HZwbKZwHu/FcRjIHYg03MSQh5Ah90YOyG8k3g5OTkbsX6TRBeJ1ymxtQIm62Hahci4Lqas
awfesQ3o7up/MyCwSev8FTnFX18SJqV3nndbAAAAAElFTkSuQmCC HXjHNqC7K//NgMAm7QtXZBd/AWaMJXnjHFh9AAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<data name="btnZoomIn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="btnZoomIn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -307,25 +307,25 @@
<data name="btnSettings.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="btnSettings.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALCSURBVEhLpVY9aFNRFA6ig4sOijqpU5QK/clLcClmUVwc YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALDSURBVEhLpVY9aFNRFA6ig4sOijqpU5QI/XsNLsUsiouD
BF2MYrdWSfLevfcFdRCCDjqJYAURBylaoZKX91LRVVzs4mCrg0Ohi7i4qNAKteZ5vptz4zWvqSH94HDP oEP8wW6tkuS9e+8L6lAIOugkghVEHKRohUpe3ktFV3Gxi4OtDg6FLuLiokIr1Jjn+W7Ojdf81JB+cLjn
+e453zn33hdIyiDj1U6yq5GToX9g7PEv4i8z1T8ct/bUEUHsqGgG8bAMhnIqisENiGBNJ20GI8VnPyC4 fPec75x77wskYTDilU+yq5GWoX9g/PEv4q8w1T8ct/zUEUHsqGgO8ZAMBtMqisGlRFDTSZvBcO7ZDwh2
nmVl9IjT+sdRt7EX00IQa6YcfGz7IpjktM3BNBguzwzo+OrzneBafFjOV19v1Yn9wHFn90N8QEUrTGnQ slEZPeK0/nHUre7FtBDEOlIIPjZ9EUxz2uZgGgwV5lI6vvZ8J7gGHxYypddbdWI/cNz5/RBPqWiNKQ16
m7wHbywrouO81TscGU78nTSKM279FPicaBxp8WGcVQ26qjAe8aNj2PNdNyeEiJVSMa03wHUFTblkN8Ca k/fgjY2K6Dhv9Q5HhpN/J43iEbdyCnxaVI80+DAeVVW6qjAe9qNj2PNdNy2EiJVSMa03wHUFTbliN8Ca
FtPLLT+Mc17wMq+eTI2K6Vt59XA3aqTnTVgNXmihbnBU44Q+vqpP0bd/H34rpvdQ0QJyrqjSmpTyjS4g FLOrDT+M017wMqOezIyJ2VsZ9XA3aqTnTVoNXmihbnBU9YQ+vqrM0Ld/H34jpvdQ0RJyrqp8TUr5RhcQ
kHAEcVipVPrKNPhz4Ch3iKkk8BvAKdAgJ2qvlCgtKyVjqSeWa1gxfaFQ+A0x+HyaOcuPPc87xJJJ4MeF SDiCOCyfz39lGvw5cJQ7yFQ78BvAKdAgLcqvlMivKiVjqSeWNayYPpvN/oYYfD7NguXHnucdYsl24MeF
Bo4Xzl0S18Z8amAL0oRNE2Mlrmn5aPCZpdbHoKqnB/1gD4cpEpw3kxkRE2O1mjcRF4vFXVzaG3BFEOiw Bo4XLlwW18d9amAL0oR1E2Mlrm75aPCZpTpjQFWSA36wh8MECS6ayYyIibFazeuIc7ncLi7tDbgiCLTY
SRK7Q+tqBx9z2caQ0r1AAnfJ5lFkTblarVa3cJqG67rfTA5OQP5begNB/CinJIGCLpb47okrduS0jVOS NIndoXW9hY+5bGNI6V4kgbtkiyiyplwvlUpbOE3Ddd1vJgcnIP8tvYEgfoxT2oGCLtb23ROXa8lpGqe0
wCam4YnsE1Q4pQ2a9qLJsfK0cUoS9LBnqPA2HXPBbkAP+IVT2iChTyYHorgyslmqv84p3YH7RrFtJLLo A5uYhieyT1DklCZo2ksmx8rTxintoIc9Q4W36ZhLdgN6wC+c0gQJfTI5EMWVkc1T/RSndAfuG8W2kciy
+/5Z8k/TIB8692mv/QX2BJrkJyZDsZnSxFg7ruU7l/UGKmgYYbMas2Pjowmd6iaXb4xyubwDhZatdMRd 7/tnyT9Ng3xo3ae95hfYE2iSn5gMxWZKE2NtuZbvXNYbqKBqhM1qzI6NjyZ0qptcvjEKhcIOFFq21hJ3
jZpsZ5mNQclpFNA1PUBcqVT20ZSLmBQ8rUu0dxB75L9j/p8/EP/F+Pj4NnY1SAQ/QN2AxO8xrUHcYXb7 NWqynWU2BiUnUUDX9ABxsVjcR1MuY1LwtK7Q3kHskf+O+X/+QPwXExMT29jVIBH8AHUDEr/HtAZxh9nt
Bx2/AHG280yvg1TqD2SNZIrdoGvMAAAAAElFTkSuQmCC H3T88xBnu8B0ByQSfwCqJWQA7REYAQAAAABJRU5ErkJggg==
</value> </value>
</data> </data>
<metadata name="statusbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>128, 20</value>
</metadata>
<metadata name="OpenFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="OpenFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>233, 25</value> <value>233, 25</value>
</metadata> </metadata>
<metadata name="PrintDocument1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>368, 25</value>
</metadata>
</root> </root>

View File

@@ -3,9 +3,10 @@ Imports System.Globalization
Imports System.Text.RegularExpressions Imports System.Text.RegularExpressions
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports Independentsoft.Msg Imports Independentsoft.Msg
Imports DevExpress.Spreadsheet.DocumentFormat
Imports DevExpress.Spreadsheet Imports DevExpress.Spreadsheet
Imports GdPicture14 Imports GdPicture14
Imports DevExpress
Imports DevExpress.Office.Utils
Public Class DocumentViewer Public Class DocumentViewer
Private Enum ZoomMode Private Enum ZoomMode
@@ -69,9 +70,7 @@ Public Class DocumentViewer
''' Terminate Viewer, freeing up resources and deleting temp files ''' Terminate Viewer, freeing up resources and deleting temp files
''' </summary> ''' </summary>
Public Sub Done() Public Sub Done()
_logger.Warn("Called Done, removing temp files")
DeleteTempFiles() DeleteTempFiles()
'Dispose()
End Sub End Sub
''' <summary> ''' <summary>
@@ -132,28 +131,37 @@ Public Class DocumentViewer
Dim oTempFileName = IO.Path.GetTempFileName() Dim oTempFileName = IO.Path.GetTempFileName()
oMime.Save(oTempFileName, True) oMime.Save(oTempFileName, True)
RichEditControl1.LoadDocument(oTempFileName, DevExpress.XtraRichEdit.DocumentFormat.Mht) RichEditControl1.LoadDocument(oTempFileName, XtraRichEdit.DocumentFormat.Mht)
_TempFiles.Add(oTempFileName) _TempFiles.Add(oTempFileName)
RichEditControl1.Visible = True RichEditControl1.Visible = True
RichEditControl1.Dock = DockStyle.Fill RichEditControl1.Dock = DockStyle.Fill
Me.infoLabel.Text = "Type: " & "MSG Email File" Case ".EML", ".DOC", ".DOCX", ".ODT", ".RTF", ".TXT"
Case ".EML" Dim oFormat As XtraRichEdit.DocumentFormat = XtraRichEdit.DocumentFormat.Undefined
RichEditControl1.LoadDocument(FilePath, DevExpress.XtraRichEdit.DocumentFormat.Mht)
Select Case oExtension.ToUpper
Case ".EML" : oFormat = XtraRichEdit.DocumentFormat.Mht
Case ".DOC" : oFormat = XtraRichEdit.DocumentFormat.Doc
Case ".DOCX" : oFormat = XtraRichEdit.DocumentFormat.OpenXml
Case ".ODT" : oFormat = XtraRichEdit.DocumentFormat.OpenDocument
Case ".RTF" : oFormat = XtraRichEdit.DocumentFormat.Rtf
Case ".TXT" : oFormat = XtraRichEdit.DocumentFormat.PlainText
End Select
RichEditControl1.LoadDocument(FilePath, oFormat)
RichEditControl1.Visible = True RichEditControl1.Visible = True
RichEditControl1.Dock = DockStyle.Fill RichEditControl1.Dock = DockStyle.Fill
Me.infoLabel.Text = "Type: " & "EML Email File"
Case ".XLSX", ".XLS", "CSV" Case ".XLSX", ".XLS", "CSV"
Dim oFormat As DevExpress.Spreadsheet.DocumentFormat = Undefined Dim oFormat As Spreadsheet.DocumentFormat = Spreadsheet.DocumentFormat.Undefined
Select Case oExtension.ToUpper Select Case oExtension.ToUpper
Case "XLSX" : oFormat = Xlsx Case "XLSX" : oFormat = Spreadsheet.DocumentFormat.Xlsx
Case "XLS" : oFormat = Xls Case "XLS" : oFormat = Spreadsheet.DocumentFormat.Xls
Case "CSV" : oFormat = Csv Case "CSV" : oFormat = Spreadsheet.DocumentFormat.Csv
End Select End Select
SpreadsheetControl1.LoadDocument(FilePath, oFormat) SpreadsheetControl1.LoadDocument(FilePath, oFormat)
@@ -164,22 +172,11 @@ Public Class DocumentViewer
SpreadsheetControl1.Visible = True SpreadsheetControl1.Visible = True
SpreadsheetControl1.Dock = DockStyle.Fill SpreadsheetControl1.Dock = DockStyle.Fill
Me.infoLabel.Text = "Type: " & "Excel/CSV File"
Case Else Case Else
_logger.Info("Displaying file {0}", FilePath)
mainToolStrip.Visible = True mainToolStrip.Visible = True
GdViewer.DisplayFromFile(FilePath) GdViewer.DisplayFromFile(FilePath)
Me.infoLabel.Text = "Type: " & GetDocumentTypeLabel()
End Select End Select
If _hide_file_info_from_user Then
statusLabel.Text = String.Empty
Else
statusLabel.Text = "Path: " & FilePath
End If
Catch ex As Exception Catch ex As Exception
_logger.Error(ex) _logger.Error(ex)
End Try End Try
@@ -197,25 +194,6 @@ Public Class DocumentViewer
UpdateMainUi() UpdateMainUi()
End Sub End Sub
Private Function GetDocumentTypeLabel() As String
Dim result As String = ""
Select Case GdViewer.GetDocumentType()
Case DocumentType.DocumentTypeBitmap
result = "Imagefile"
Case DocumentType.DocumentTypeMetaFile
result = "Metafile"
Case DocumentType.DocumentTypePDF
result = "PDF"
Case DocumentType.DocumentTypeSVG
result = "SVG"
Case DocumentType.DocumentTypeTXT
result = "textfile"
Case DocumentType.DocumentTypeUnknown
result = "Unknown"
End Select
Return result
End Function
''' <summary> ''' <summary>
''' Configures the viewer to hide the file path to the end-user. ''' Configures the viewer to hide the file path to the end-user.
''' </summary> ''' </summary>
@@ -559,8 +537,9 @@ Public Class DocumentViewer
GdViewer.Focus() GdViewer.Focus()
End Sub End Sub
'Private Sub DocumentViewer_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed Private Sub RichEditControl1_SizeChanged(sender As Object, e As EventArgs) Handles RichEditControl1.SizeChanged
' _logger.Warn("Disposing GDViewer") Dim oControlWidth = RichEditControl1.Width - 100
' GdViewer.Dispose() Dim oPageWidth = Units.DocumentsToPixelsF(RichEditControl1.Document.Sections(0).Page.Width, RichEditControl1.DpiX)
'End Sub RichEditControl1.Views.PrintLayoutView.ZoomFactor = oControlWidth / oPageWidth
End Sub
End Class End Class

View File

@@ -78,7 +78,7 @@
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.1")> <Assembly: AssemblyVersion("1.0.2.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.2.1")> <Assembly: AssemblyVersion("1.0.2.2")>
<Assembly: AssemblyFileVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@@ -157,9 +157,19 @@ Public Class frmLookupGrid
End Sub End Sub
Private Sub gridLookup_KeyUp(sender As Object, e As KeyEventArgs) Handles gridLookup.KeyUp Private Sub gridLookup_KeyUp(sender As Object, e As KeyEventArgs) Handles gridLookup.KeyUp
HandleCustomKeys(e)
End Sub
Private Sub gridLookup_EditorKeyUp(sender As Object, e As KeyEventArgs) Handles gridLookup.EditorKeyUp
HandleCustomKeys(e)
End Sub
Private Sub HandleCustomKeys(e As KeyEventArgs)
If e.KeyCode = Keys.Escape Then If e.KeyCode = Keys.Escape Then
Close() Close()
ElseIf e.KeyCode = Keys.F2 Then ElseIf e.KeyCode = Keys.F2 Then
' Make sure the currently focused row's state is saved
viewLookup.PostEditor()
SaveSelectedValues() SaveSelectedValues()
DialogResult = DialogResult.OK DialogResult = DialogResult.OK

View File

@@ -52,7 +52,7 @@
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" /> <package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -49,7 +49,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
@@ -125,9 +125,7 @@
<CustomToolNamespace>My</CustomToolNamespace> <CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput> <LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None> </None>
<None Include="packages.config"> <None Include="packages.config" />
<SubType>Designer</SubType>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Modules.Database\Database.vbproj"> <ProjectReference Include="..\Modules.Database\Database.vbproj">

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -52,7 +52,7 @@
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" /> <package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

11
EDMI.File/Archive.vb Normal file
View File

@@ -0,0 +1,11 @@
Imports DigitalData.Modules.Logging
Public Class Archive
Private _LogConfig As LogConfig
Private _Logger As Logger
Public Sub New(LogConfig As LogConfig)
_LogConfig = LogConfig
_Logger = LogConfig.GetLogger()
End Sub
End Class

120
EDMI.File/EDMI.File.vbproj Normal file
View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{1477032D-7A02-4C5F-B026-A7117DA4BC6B}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>DigitalData.Modules.EDMI.File</RootNamespace>
<AssemblyName>DigitalData.Modules.EDMI.File</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>DigitalData.Modules.EDMI.File.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>DigitalData.Modules.EDMI.File.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="Archive.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Modules.Logging\Logging.vbproj">
<Project>{903B2D7D-3B80-4BE9-8713-7447B704E1B0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
'------------------------------------------------------------------------------
' <auto-generated>
' Dieser Code wurde von einem Tool generiert.
' Laufzeitversion:4.0.30319.42000
'
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
' der Code erneut generiert wird.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>false</MySubMain>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>1</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

View File

@@ -0,0 +1,35 @@
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
<Assembly: AssemblyTitle("EDMI.File")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("EDMI.File")>
<Assembly: AssemblyCopyright("Copyright © 2020")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'Die folgende GUID wird für die typelib-ID verwendet, wenn dieses Projekt für COM verfügbar gemacht wird.
<Assembly: Guid("2a4f6a80-e6e0-4764-ba6e-91484bda887f")>
' 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,
' indem Sie "*" wie unten gezeigt eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@@ -0,0 +1,63 @@
'------------------------------------------------------------------------------
' <auto-generated>
' Dieser Code wurde von einem Tool generiert.
' Laufzeitversion:4.0.30319.42000
'
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
' der Code erneut generiert wird.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Imports System
Namespace My.Resources
'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
'-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
'''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DigitalData.Modules.EDMI.File.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
End Set
End Property
End Module
End Namespace

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,73 @@
'------------------------------------------------------------------------------
' <auto-generated>
' Dieser Code wurde von einem Tool generiert.
' Laufzeitversion:4.0.30319.42000
'
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
' der Code erneut generiert wird.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "Automatische My.Settings-Speicherfunktion"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
If Not addedHandler Then
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
addedHandler = True
End If
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
End Class
End Namespace
Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.DigitalData.Modules.EDMI.File.My.MySettings
Get
Return Global.DigitalData.Modules.EDMI.File.My.MySettings.Default
End Get
End Property
End Module
End Namespace

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="4.7.0" targetFramework="net472" />
</packages>

View File

@@ -89,7 +89,7 @@
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="ScintillaNET, Version=3.6.3.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ScintillaNET, Version=3.6.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\jacobslusser.ScintillaNET.3.6.3\lib\net40\ScintillaNET.dll</HintPath> <HintPath>..\packages\jacobslusser.ScintillaNET.3.6.3\lib\net40\ScintillaNET.dll</HintPath>
@@ -496,9 +496,9 @@
<Project>{44982f9b-6116-44e2-85d0-f39650b1ef99}</Project> <Project>{44982f9b-6116-44e2-85d0-f39650b1ef99}</Project>
<Name>Config</Name> <Name>Config</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\Modules.EDMIAPI\EDMIAPI.vbproj"> <ProjectReference Include="..\Modules.EDMIAPI\EDMI.API.vbproj">
<Project>{5b1171dc-fffe-4813-a20d-786aae47b320}</Project> <Project>{5b1171dc-fffe-4813-a20d-786aae47b320}</Project>
<Name>EDMIAPI</Name> <Name>EDMI.API</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\Modules.Language\Language.vbproj"> <ProjectReference Include="..\Modules.Language\Language.vbproj">
<Project>{d3c8cfed-d6f6-43a8-9bdf-454145d0352f}</Project> <Project>{d3c8cfed-d6f6-43a8-9bdf-454145d0352f}</Project>
@@ -512,9 +512,9 @@
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project> <Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name> <Name>Logging</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SERVICES\DDEDM_NetworkService\IDBService.vbproj"> <ProjectReference Include="..\SERVICES\DDEDM_NetworkService\EDMIService.vbproj">
<Project>{A8C3F298-76AB-4359-AB3C-986E313B4336}</Project> <Project>{A8C3F298-76AB-4359-AB3C-986E313B4336}</Project>
<Name>IDBService</Name> <Name>EDMIService</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -3,6 +3,6 @@
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" /> <package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
<package id="FirebirdSql.EntityFrameworkCore.Firebird" version="6.4.0" targetFramework="net461" /> <package id="FirebirdSql.EntityFrameworkCore.Firebird" version="6.4.0" targetFramework="net461" />
<package id="jacobslusser.ScintillaNET" version="3.6.3" targetFramework="net461" /> <package id="jacobslusser.ScintillaNET" version="3.6.3" targetFramework="net461" />
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="net461" /> <package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -45,20 +45,17 @@
<ItemGroup> <ItemGroup>
<Reference Include="DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL"> <Reference Include="DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
</Reference> </Reference>
<Reference Include="DevExpress.Utils.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL"> <Reference Include="DevExpress.Utils.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
</Reference> </Reference>
<Reference Include="DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <Reference Include="DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL"> <Reference Include="DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -62,7 +62,7 @@
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -49,7 +49,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -4,6 +4,18 @@ Imports GdPicture14
Public Class Form1 Public Class Form1
Private oSubform As Form3 Private oSubform As Form3
Private LogConfig As LogConfig
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
Dim oLogConfig As New LogConfig(LogConfig.PathType.CustomPath,
Application.StartupPath,
Nothing,
My.Application.Info.CompanyName,
My.Application.Info.ProductName)
LogConfig = oLogConfig
End Sub
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 = OpenFileDialog1.ShowDialog() Dim oResult = OpenFileDialog1.ShowDialog()
@@ -14,8 +26,7 @@ Public Class Form1
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Try Try
Dim oKey = "0467389434974657969312056" Dim oKey = "0467389434974657969312056"
Dim oLogConfig As New LogConfig(LogConfig.PathType.CurrentDirectory) Dim oSubform As New Form3(LogConfig, oKey)
Dim oSubform As New Form3(oLogConfig, oKey)
oSubform.FilePath = TextBox1.Text oSubform.FilePath = TextBox1.Text
oSubform.Show() oSubform.Show()
@@ -27,8 +38,7 @@ Public Class Form1
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Try Try
Dim oKey = "0467389434974657969312056" Dim oKey = "0467389434974657969312056"
Dim oLogConfig As New LogConfig(LogConfig.PathType.CurrentDirectory) Dim oSubform As New Form4(LogConfig, oKey)
Dim oSubform As New Form4(oLogConfig, oKey)
oSubform.FilePath = TextBox1.Text oSubform.FilePath = TextBox1.Text
oSubform.Show() oSubform.Show()
@@ -76,4 +86,6 @@ Public Class Form1
End If End If
End Using End Using
End Sub End Sub
End Class End Class

View File

@@ -52,7 +52,7 @@
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -52,7 +52,7 @@
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net461" /> <package id="Newtonsoft.Json" version="12.0.2" targetFramework="net461" />
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -52,7 +52,7 @@
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" /> <package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -55,7 +55,7 @@
<Reference Include="DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> <Reference Include="DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraPrinting.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <Reference Include="DevExpress.XtraPrinting.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -45,7 +45,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -59,7 +59,7 @@
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="Oracle.ManagedDataAccess"> <Reference Include="Oracle.ManagedDataAccess">
<HintPath>P:\Visual Studio Projekte\Bibliotheken\Oracle.ManagedDataAccess.dll</HintPath> <HintPath>P:\Visual Studio Projekte\Bibliotheken\Oracle.ManagedDataAccess.dll</HintPath>

View File

@@ -3,5 +3,5 @@
<package id="EntityFramework" version="6.2.0" targetFramework="net461" /> <package id="EntityFramework" version="6.2.0" targetFramework="net461" />
<package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net461" /> <package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net461" />
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" /> <package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="DocumentResult" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>DigitalData.Modules.EDMI.API.IDBServiceReference.DocumentResult</TypeInfo>
</GenericObjectDataSource>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="DocumentResult2" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>DigitalData.Modules.EDMI.API.IDBServiceReference.DocumentResult2</TypeInfo>
</GenericObjectDataSource>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="IndexResult" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>DigitalData.Modules.EDMI.API.IDBServiceReference.IndexResult</TypeInfo>
</GenericObjectDataSource>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="NonQueryResult" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>DigitalData.Modules.EDMI.API.IDBServiceReference.NonQueryResult</TypeInfo>
</GenericObjectDataSource>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="ScalarResult" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>DigitalData.Modules.EDMI.API.IDBServiceReference.ScalarResult</TypeInfo>
</GenericObjectDataSource>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="TableResult" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>DigitalData.Modules.EDMI.API.IDBServiceReference.TableResult</TypeInfo>
</GenericObjectDataSource>

View File

@@ -0,0 +1,186 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5B1171DC-FFFE-4813-A20D-786AAE47B320}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>DigitalData.Modules.EDMI.API</RootNamespace>
<AssemblyName>DigitalData.Modules.EDMI.API</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>DigitalData.Modules.EDMI.API.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>DigitalData.Modules.EDMI.API.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="Channel.vb" />
<Compile Include="Connected Services\IDBServiceReference\Reference.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.svcmap</DependentUpon>
</Compile>
<Compile Include="Constants.vb" />
<Compile Include="Document.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Connected Services\IDBServiceReference\DigitalData.Modules.EDMI.API.IDBServiceReference.DocumentResult.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</None>
<None Include="Connected Services\IDBServiceReference\DigitalData.Modules.EDMI.API.IDBServiceReference.DocumentResult2.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</None>
<None Include="Connected Services\IDBServiceReference\DigitalData.Modules.EDMI.API.IDBServiceReference.IndexResult.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</None>
<None Include="Connected Services\IDBServiceReference\DigitalData.Modules.EDMI.API.IDBServiceReference.NonQueryResult.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</None>
<None Include="Connected Services\IDBServiceReference\DigitalData.Modules.EDMI.API.IDBServiceReference.ScalarResult.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</None>
<None Include="Connected Services\IDBServiceReference\DigitalData.Modules.EDMI.API.IDBServiceReference.TableResult.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</None>
<None Include="Connected Services\IDBServiceReference\DigitalData.Modules.Filesystem.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\IDBServiceReference\DigitalData.Services.IDBService.wsdl" />
<None Include="Connected Services\IDBServiceReference\DigitalData.Services.IDBService.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\IDBServiceReference\DigitalData.Services.IDBService1.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\IDBServiceReference\service.wsdl" />
<None Include="Connected Services\IDBServiceReference\service.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\IDBServiceReference\System.Data.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\IDBServiceReference\System.IO.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\IDBServiceReference\System.xsd">
<SubType>Designer</SubType>
</None>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Modules.Logging\Logging.vbproj">
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<WCFMetadataStorage Include="Connected Services\IDBServiceReference\" />
</ItemGroup>
<ItemGroup>
<None Include="Connected Services\IDBServiceReference\configuration91.svcinfo" />
</ItemGroup>
<ItemGroup>
<None Include="Connected Services\IDBServiceReference\configuration.svcinfo" />
</ItemGroup>
<ItemGroup>
<None Include="Connected Services\IDBServiceReference\Reference.svcmap">
<Generator>WCF Proxy Generator</Generator>
<LastGenOutput>Reference.vb</LastGenOutput>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

View File

@@ -45,7 +45,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="protobuf-net, Version=2.4.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL"> <Reference Include="protobuf-net, Version=2.4.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
<HintPath>..\packages\protobuf-net.2.4.0\lib\net40\protobuf-net.dll</HintPath> <HintPath>..\packages\protobuf-net.2.4.0\lib\net40\protobuf-net.dll</HintPath>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
<package id="protobuf-net" version="2.4.0" targetFramework="net461" /> <package id="protobuf-net" version="2.4.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -51,7 +51,7 @@
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")> <Assembly: AssemblyVersion("1.0.1.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@@ -18,6 +18,7 @@ Public Class ZUGFeRDInterface
NoValidFile NoValidFile
NoZugferd NoZugferd
NoValidZugferd NoValidZugferd
MissingProperties
End Enum End Enum
Public ReadOnly Property FileGroup As FileGroups Public ReadOnly Property FileGroup As FileGroups
@@ -66,6 +67,16 @@ Public Class ZUGFeRDInterface
Return SerializeZUGFeRDDocument(oXmlDocument) Return SerializeZUGFeRDDocument(oXmlDocument)
End Function End Function
Public Function ExtractZUGFeRDFileWithGDPicture(Stream As Stream) As CrossIndustryDocumentType
Dim oXmlDocument = ValidateZUGFeRDFileWithGDPicture(Stream)
If IsNothing(oXmlDocument) Then
Throw New ZUGFeRDExecption(ErrorType.NoZugferd, "Datei ist keine ZUGFeRD Datei.")
End If
Return SerializeZUGFeRDDocument(oXmlDocument)
End Function
Public Function ValidateZUGFeRDFile(Path As String) As XPathDocument Public Function ValidateZUGFeRDFile(Path As String) As XPathDocument
Dim oProcessOutput, oProcessError As String Dim oProcessOutput, oProcessError As String
Dim oXmlDocument As XPathDocument Dim oXmlDocument As XPathDocument
@@ -110,46 +121,63 @@ Public Class ZUGFeRDInterface
Return oXmlDocument Return oXmlDocument
End Function End Function
Public Function ValidateZUGFeRDFileWithGDPicture(Stream As Stream) As XPathDocument
Dim oAttachmentExtractor = New PDFAttachments(_logConfig)
Dim oAllowedExtensions = New List(Of String) From {"xml"}
Try
Dim oResults = oAttachmentExtractor.Extract(Stream, oAllowedExtensions)
Return HandleAttachments(oResults)
Catch ex As Exception
_logger.Error(ex)
Throw ex
End Try
End Function
Public Function ValidateZUGFeRDFileWithGDPicture(Path As String) As XPathDocument Public Function ValidateZUGFeRDFileWithGDPicture(Path As String) As XPathDocument
Dim oAttachmentExtractor = New PDFAttachments(_logConfig) Dim oAttachmentExtractor = New PDFAttachments(_logConfig)
Dim oAllowedExtensions = New List(Of String) From {"xml"} Dim oAllowedExtensions = New List(Of String) From {"xml"}
Dim oXmlDocument As XPathDocument
Try Try
Dim oResults = oAttachmentExtractor.Extract(Path, oAllowedExtensions) Dim oResults = oAttachmentExtractor.Extract(Path, oAllowedExtensions)
Return HandleAttachments(oResults)
Catch ex As Exception
_logger.Error(ex)
Throw ex
End Try
End Function
If oResults Is Nothing Then Private Function HandleAttachments(Results As List(Of PDFAttachments.AttachmentResult)) As XPathDocument
Throw New ZUGFeRDExecption(ErrorType.NoZugferd, "Datei ist keine ZUGFeRD Datei.") Dim oXmlDocument As XPathDocument
If Results Is Nothing Then
Throw New ZUGFeRDExecption(ErrorType.NoZugferd, "Datei ist keine ZUGFeRD Datei.")
End If
If Results.Count = 0 Then
Throw New ZUGFeRDExecption(ErrorType.NoZugferd, "Datei ist keine ZUGFeRD Datei.")
End If
Dim oFound As Boolean = False
Dim oFoundResult As PDFAttachments.AttachmentResult = Nothing
For Each oResult In Results
If oResult.FileName.ToUpper() = PDFAttachments.ZUGFERD_XML_FILENAME.ToUpper() Then
oFound = True
oFoundResult = oResult
End If End If
Next
If oResults.Count = 0 Then If Not oFound Then
Throw New ZUGFeRDExecption(ErrorType.NoZugferd, "Datei ist keine ZUGFeRD Datei.") Throw New ZUGFeRDExecption(ErrorType.NoZugferd, "Datei ist keine ZUGFeRD Datei.")
End If End If
Dim oFound As Boolean = False Try
Dim oFoundResult As PDFAttachments.AttachmentResult = Nothing Using oStream As New MemoryStream(oFoundResult.FileContents)
oXmlDocument = New XPathDocument(oStream)
End Using
For Each oResult In oResults Return oXmlDocument
If oResult.FileName = PDFAttachments.ZUGFERD_XML_FILENAME Then
oFound = True
oFoundResult = oResult
End If
Next
If Not oFound Then
Throw New ZUGFeRDExecption(ErrorType.NoZugferd, "Datei ist keine ZUGFeRD Datei.")
End If
Try
Using oStream As New MemoryStream(oFoundResult.FileContents)
oXmlDocument = New XPathDocument(oStream)
End Using
Return oXmlDocument
Catch ex As Exception
_logger.Error(ex)
Throw ex
End Try
Catch ex As Exception Catch ex As Exception
_logger.Error(ex) _logger.Error(ex)
Throw ex Throw ex

View File

@@ -21,69 +21,116 @@ Public Class PDFAttachments
''' Extracts all embedded files from a PDF file. ''' Extracts all embedded files from a PDF file.
''' Note: This does NOT filter out `ZUGFeRD-invoice.xml` anymore to allow for a more generic use. ''' Note: This does NOT filter out `ZUGFeRD-invoice.xml` anymore to allow for a more generic use.
''' </summary> ''' </summary>
''' <param name="FileName"></param> ''' <param name="FilePath">Filepath of the pdf</param>
''' <param name="AllowedExtensions"></param> ''' <param name="AllowedExtensions">List of allowed extensions to be extracted</param>
''' <returns></returns> Public Function Extract(FilePath As String, AllowedExtensions As List(Of String)) As List(Of AttachmentResult)
Public Function Extract(FileName As String, AllowedExtensions As List(Of String)) As List(Of AttachmentResult)
Dim oResults As New List(Of AttachmentResult) Dim oResults As New List(Of AttachmentResult)
Dim oExtensions = AllowedExtensions.ConvertAll(New Converter(Of String, String)(Function(ext) ext.ToUpper)) Dim oExtensions = AllowedExtensions.ConvertAll(New Converter(Of String, String)(Function(ext) ext.ToUpper))
Logger.Debug("Extracting embedded files from [{0}]", FilePath)
Try Try
Using oGDPicturePDF As New GdPicturePDF() Using oGDPicturePDF As New GdPicturePDF()
If oGDPicturePDF.LoadFromFile(FileName, False) = GdPictureStatus.OK Then If oGDPicturePDF.LoadFromFile(FilePath, False) = GdPictureStatus.OK Then
Dim oEmbeddedFileCount As Integer = oGDPicturePDF.GetEmbeddedFileCount() oResults = DoExtract(oGDPicturePDF, oExtensions)
If oGDPicturePDF.GetStat() = GdPictureStatus.OK Then
If oEmbeddedFileCount > 0 Then
For index = 0 To oEmbeddedFileCount - 1
Dim oFileName As String = oGDPicturePDF.GetEmbeddedFileName(index)
If oGDPicturePDF.GetStat() = GdPictureStatus.OK Then
Dim oExtension = New FileInfo(oFileName).Extension.ToUpper.Substring(1)
If oExtensions.Contains(oExtension) Then
Dim FileSize As Integer = oGDPicturePDF.GetEmbeddedFileSize(index)
If oGDPicturePDF.GetStat() = GdPictureStatus.OK Then
Dim oFileData As Byte() = New Byte(FileSize) {}
Dim status As GdPictureStatus = oGDPicturePDF.ExtractEmbeddedFile(index, oFileData)
If status = GdPictureStatus.OK Then
oResults.Add(New AttachmentResult() With {
.FileContents = oFileData,
.FileName = oFileName
})
Else
Logger.Error("The embedded file [{0}] has failed to extract. Status: {1}", oFileName, oGDPicturePDF.GetStat().ToString())
Continue For
End If
Else
Logger.Error("An error occurred getting the file size for [{0}]. Status: {1}", oFileName, oGDPicturePDF.GetStat().ToString())
Continue For
End If
Else
Logger.Warn("File [{0}] was skipped because its extension [{1}] is not allowed.", oFileName, oExtension)
Continue For
End If
Else
Logger.Error("An error occurred getting the file name for [{0}]. Status: {1}", oFileName, oGDPicturePDF.GetStat().ToString())
Continue For
End If
Next
End If
Else
Dim oMessage = String.Format("An error occurred getting the number of embedded files. Status: {0}", oGDPicturePDF.GetStat().ToString())
Throw New ApplicationException(oMessage)
End If
Else Else
Dim oMessage = String.Format("The file [{0}] can't be loaded. Status: [{1}]", FileName, oGDPicturePDF.GetStat().ToString()) Dim oMessage = String.Format("The file [{0}] can't be loaded. Status: [{1}]", FilePath, oGDPicturePDF.GetStat().ToString())
Throw New ApplicationException(oMessage) Throw New ApplicationException(oMessage)
End If End If
End Using End Using
Return oResults Return oResults
Catch ex As Exception Catch ex As Exception
Logger.Warn("Unexpected Error while Extracting attachments from File [{0}]", FileName) Logger.Warn("Unexpected Error while Extracting attachments from File [{0}]", FilePath)
Logger.Error(ex) Logger.Error(ex)
Return Nothing Return Nothing
End Try End Try
End Function End Function
''' <summary>
''' Extracts all embedded files from a PDF file.
''' Note: This does NOT filter out `ZUGFeRD-invoice.xml` anymore to allow for a more generic use.
''' </summary>
''' <param name="Stream">Filestream of the pdf</param>
''' <param name="AllowedExtensions">List of allowed extensions to be extracted</param>
Public Function Extract(Stream As Stream, AllowedExtensions As List(Of String)) As List(Of AttachmentResult)
Dim oResults As New List(Of AttachmentResult)
Dim oExtensions = AllowedExtensions.ConvertAll(New Converter(Of String, String)(Function(ext) ext.ToUpper))
Logger.Debug("Extracting embedded files from stream")
Try
Using oGDPicturePDF As New GdPicturePDF()
If oGDPicturePDF.LoadFromStream(Stream, False) = GdPictureStatus.OK Then
oResults = DoExtract(oGDPicturePDF, oExtensions)
Else
Dim oMessage = String.Format("The filestream can't be loaded. Status: [{0}]", oGDPicturePDF.GetStat().ToString())
Throw New ApplicationException(oMessage)
End If
End Using
Return oResults
Catch ex As Exception
Logger.Warn("Unexpected Error while Extracting attachments from Filestream")
Logger.Error(ex)
Return Nothing
End Try
End Function
Private Function DoExtract(GDPicturePDF As GdPicturePDF, Extensions As List(Of String)) As List(Of AttachmentResult)
Dim oResults As New List(Of AttachmentResult)
Dim oEmbeddedFileCount As Integer = GDPicturePDF.GetEmbeddedFileCount()
If GDPicturePDF.GetStat() = GdPictureStatus.OK Then
Logger.Debug("Embedded file count is: [{0}]", oEmbeddedFileCount)
If oEmbeddedFileCount > 0 Then
For oIndex = 0 To oEmbeddedFileCount - 1
Dim oFileName As String = GDPicturePDF.GetEmbeddedFileName(oIndex)
If GDPicturePDF.GetStat() = GdPictureStatus.OK Then
Logger.Debug("Extracting embedded file [{0}]", oFileName)
Dim oExtension = New FileInfo(oFileName).Extension.ToUpper.Substring(1)
If Extensions.Contains(oExtension) Then
Dim oFileSize As Integer = GDPicturePDF.GetEmbeddedFileSize(oIndex)
If GDPicturePDF.GetStat() = GdPictureStatus.OK Then
Logger.Debug("Filesize of embedded file is [{0}]", oFileSize)
Dim oFileData As Byte() = New Byte(oFileSize) {}
Dim oStatus As GdPictureStatus = GDPicturePDF.ExtractEmbeddedFile(oIndex, oFileData)
If oStatus = GdPictureStatus.OK Then
Logger.Debug("Embedded file [{0}] extracted sucessfully!", oFileName)
oResults.Add(New AttachmentResult() With {
.FileContents = oFileData,
.FileName = oFileName
})
Else
Logger.Error("The embedded file [{0}] has failed to extract. Status: {1}", oFileName, GDPicturePDF.GetStat().ToString())
Continue For
End If
Else
Logger.Error("An error occurred getting the file size for [{0}]. Status: {1}", oFileName, GDPicturePDF.GetStat().ToString())
Continue For
End If
Else
Logger.Warn("File [{0}] was skipped because its extension [{1}] is not allowed.", oFileName, oExtension)
Continue For
End If
Else
Logger.Error("An error occurred getting the file name for [{0}]. Status: {1}", oFileName, GDPicturePDF.GetStat().ToString())
Continue For
End If
Next
End If
Return oResults
Else
Dim oMessage = String.Format("An error occurred getting the number of embedded files. Status: {0}", GDPicturePDF.GetStat().ToString())
Throw New ApplicationException(oMessage)
End If
End Function
End Class End Class

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net461" /> <package id="Newtonsoft.Json" version="12.0.2" targetFramework="net461" />
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -110,7 +110,7 @@
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" /> <package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -45,7 +45,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -45,7 +45,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -45,7 +45,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -48,7 +48,7 @@
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="S22.Imap, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="S22.Imap, Version=3.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\S22.Imap.3.6.0.0\lib\net40\S22.Imap.dll</HintPath> <HintPath>..\packages\S22.Imap.3.6.0.0\lib\net40\S22.Imap.dll</HintPath>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
<package id="S22.Imap" version="3.6.0.0" targetFramework="net461" /> <package id="S22.Imap" version="3.6.0.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -45,7 +45,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -65,7 +65,7 @@
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -45,7 +45,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -0,0 +1,341 @@
Imports System.ServiceModel
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Filesystem
Imports DigitalData.Services.EDMIService
Imports System.IO
<ServiceBehavior(InstanceContextMode:=InstanceContextMode.PerSession)>
Public Class EDMIService
Implements IEDMIService
Public Shared LogConfig As LogConfig
Public Shared Database As Firebird
Public Shared AppConfig As AppConfig
Private ReadOnly _logger As Logger
Private _request As Request = Nothing
Private _debug As Boolean = False
Private _username As String
Public Sub New()
Dim oOperationContext As OperationContext = OperationContext.Current
Dim oInstanceContext As InstanceContext = oOperationContext.InstanceContext
Dim oUsername = oOperationContext.ServiceSecurityContext.WindowsIdentity.Name
_username = oUsername
_logger = LogConfig.GetLogger()
End Sub
#Region "Auth"
Private Function TestUserAuth() As Boolean
Try
'Dim oSQL As String = $"SELECT FNIDB_AUTH_USER('{_username}') FROM RDB$DATABASE;"
'Dim oResult As Boolean = Database.GetScalarValue(oSQL)
'Return oResult
Return True
Catch ex As Exception
_logger.Error(ex)
Return False
End Try
End Function
#End Region
#Region "Heartbeat"
Public Function Heartbeat() As Boolean Implements IEDMIService.Heartbeat
Return True
End Function
#End Region
#Region "Request"
Public Sub CreateRequest(Name As String, Optional Debug As Boolean = False)
_request = New Request(Name, _username, Database, Debug)
_debug = Debug
_logger.Info("Creating request {0}/{1}", _request.Name, _request.RequestId)
End Sub
Public Function CreateDatabaseRequest(Name As String, Optional Debug As Boolean = False) As String Implements IEDMIService.CreateDatabaseRequest
CreateRequest(Name, Debug)
Return _request.Name
End Function
Public Sub CloseDatabaseRequest() Implements IEDMIService.CloseDatabaseRequest
If IsNothing(_request) Then
Exit Sub
End If
_logger.Info("Closing request {0}", _request.ToString)
_request.Connection.Close()
_request = Nothing
End Sub
#End Region
#Region "Database"
Private Sub TestRequestCreated()
If IsNothing(_request) Then
Throw New Exceptions.NoRequestException()
End If
End Sub
Public Function ReturnDatatable(SQL As String) As TableResult Implements IEDMIService.ReturnDatatable
Try
TestRequestCreated()
_logger.Info($"ReturnDatatable, SQL: {SQL}")
_request.LogDebug($"ReturnDatatable, SQL: {SQL}")
Dim oResult As DataTable = Database.GetDatatableWithConnection(SQL, _request.Connection)
Return New TableResult(oResult)
Catch ex As Exception
_logger.Error(ex)
_request.LogError(ex.Message)
Return New TableResult(ex.Message)
End Try
End Function
Public Function ReturnScalar(SQL As String) As ScalarResult Implements IEDMIService.ReturnScalar
Try
TestRequestCreated()
_logger.Info($"ReturnScalar, SQL: {SQL}")
_request.LogDebug($"ReturnScalar, SQL: {SQL}")
Dim oResult As Object = Database.GetScalarValueWithConnection(SQL, _request.Connection)
Return New ScalarResult(oResult)
Catch ex As Exception
_logger.Error(ex)
_request.LogError(ex.Message)
Return New ScalarResult(ex.Message)
End Try
End Function
Public Function ExecuteNonQuery(SQL As String) As NonQueryResult Implements IEDMIService.ExecuteNonQuery
Try
TestRequestCreated()
_logger.Info($"ExecuteNonQuery, SQL: {SQL}")
_request.LogDebug($"ExecuteNonQuery, SQL: {SQL}")
Dim oResult As Boolean = Database.ExecuteNonQueryWithConnection(SQL, _request.Connection)
Return New NonQueryResult()
Catch ex As Exception
_logger.Error(ex)
_request.LogError(ex.Message)
Return New NonQueryResult(ex.Message)
End Try
End Function
#End Region
#Region "Document (with FileContainer)"
'Public Function NewFile(FileName As String, Contents() As Byte) As DocumentResult Implements IEDMIService.NewFile
' Try
' Dim oContainer As FileContainer
' Dim oContainerId As String
' If Not TestUserAuth() Then
' Throw New Exception($"User {_username} not authorized.")
' End If
' oContainer = FileContainer.Create(LogConfig, AppConfig.ContainerPassword)
' oContainerId = oContainer.ContainerId
' _logger.Debug("Container created with id {0}", oContainerId)
' Dim oExtension As String = Path.GetExtension(FileName).Substring(1)
' _logger.Debug("File extension of file {0} is {1}", FileName, oExtension)
' Dim oSQL = $"SELECT FNICM_NEW_DOC('010', '{oContainerId}', '{GetContainerName(oContainerId)}', '{FileName}', '{oExtension}', '{_username}') FROM RDB$DATABASE;"
' Dim oDocId As Int64 = Database.GetScalarValue(oSQL)
' If oDocId = -1 Then
' _logger.Warn("Database returned -1 while creating Document Entry. File was not saved!")
' Return Nothing
' End If
' _logger.Debug("Database Entry created with DocId {0}", oDocId)
' oContainer.SetFile(Contents, FileName)
' oContainer.SaveAs(GetContainerPath(oContainerId))
' _logger.Debug("File saved in Container!", FileName)
' Dim oDocument = New DocumentObject(oContainerId, oDocId, FileName)
' Return New DocumentResult(oDocument)
' Catch ex As Exception
' _logger.Error(ex)
' Return New DocumentResult(ex.Message)
' End Try
'End Function
'Public Function UpdateFile(DocObject As DocumentObject, Contents() As Byte) As DocumentResult Implements IEDMIService.UpdateFile
' Try
' TestFileExists(DocObject.ContainerId)
' ' TODO: update db
' Dim oFilePath = GetContainerPath(DocObject.ContainerId)
' Dim oFileContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oFilePath)
' oFileContainer.SetFile(Contents, oFileContainer.GetFile.FileName)
' oFileContainer.Save()
' Return New DocumentResult(DocObject)
' Catch ex As Exception
' _logger.Error(ex)
' Return Nothing
' End Try
'End Function
'Public Function GetFile(DocObject As DocumentObject) As DocumentResult Implements IEDMIService.GetFile
' Try
' TestFileExists(DocObject.ContainerId)
' Dim oContainerPath = GetContainerPath(DocObject.ContainerId)
' Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath)
' Dim oContents As Byte() = oContainer.GetFile().Contents
' Return New DocumentResult(DocObject, oContents)
' Catch ex As Exception
' _logger.Error(ex)
' Return New DocumentResult(ex.Message)
' End Try
'End Function
'Public Function DeleteFile(DocObject As DocumentObject) As Boolean Implements IEDMIService.DeleteFile
' Try
' TestFileExists(DocObject.ContainerId)
' Dim oFilePath = GetContainerPath(DocObject.ContainerId)
' IO.File.Delete(oFilePath)
' 'TODO: Delete doc from db
' Return True
' Catch ex As Exception
' _logger.Error(ex)
' Return False
' End Try
'End Function
'Private Function GetContainerPath(ContainerId As String) As String
' Return Path.Combine(AppConfig.ContainerPath, GetContainerName(ContainerId))
'End Function
'Private Function GetContainerName(ContainerId As String) As String
' Return ContainerId & ".enc"
'End Function
'Private Sub TestFileExists(ContainerId)
' Dim oContainerPath = GetContainerPath(ContainerId)
' If Not IO.File.Exists(oContainerPath) Then
' Throw New FileNotFoundException("Container existiert nicht", oContainerPath)
' End If
'End Sub
'Public Function GetDocumentByDocumentId(DocumentId As Long) As DocumentResult Implements IEDMIService.GetDocumentByDocumentId
' Try
' Dim oSQL = $"SELECT GUID, CONTAINER_ID, ORIGINAL_FILENAME FROM TBIDB_DOCUMENT WHERE GUID = {DocumentId}"
' Dim oTable = Database.GetDatatable(oSQL)
' If oTable.Rows.Count = 0 Then
' Return New DocumentResult("Document not found")
' End If
' Dim oRow As DataRow = oTable.Rows.Item(0)
' Dim oDocument As New DocumentObject(
' oRow.Item("CONTAINER_ID"),
' oRow.Item("GUID"),
' oRow.Item("ORIGINAL_FILENAME")
' )
' TestFileExists(oDocument.ContainerId)
' Dim oContainerPath = GetContainerPath(oDocument.ContainerId)
' Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath)
' Dim oContents As Byte() = oContainer.GetFile().Contents
' Return New DocumentResult(oDocument, oContents)
' Catch ex As Exception
' Return New DocumentResult(ex.Message)
' End Try
'End Function
'Public Function GetDocumentByContainerId(ContainerId As String) As DocumentResult Implements IEDMIService.GetDocumentByContainerId
' Try
' Dim oSQL = $"SELECT GUID, CONTAINER_ID, ORIGINAL_FILENAME FROM TBIDB_DOCUMENT WHERE CONTAINER_ID = '{ContainerId}'"
' Dim oTable = Database.GetDatatable(oSQL)
' If oTable.Rows.Count = 0 Then
' Return New DocumentResult("Document not found")
' End If
' Dim oRow As DataRow = oTable.Rows.Item(0)
' Dim oDocument As New DocumentObject(
' oRow.Item("CONTAINER_ID"),
' oRow.Item("GUID"),
' oRow.Item("ORIGINAL_FILENAME")
' )
' TestFileExists(oDocument.ContainerId)
' Dim oContainerPath = GetContainerPath(oDocument.ContainerId)
' Dim oContainer As FileContainer = FileContainer.Load(LogConfig, AppConfig.ContainerPassword, oContainerPath)
' Dim oContents As Byte() = oContainer.GetFile().Contents
' Return New DocumentResult(oDocument, oContents)
' Catch ex As Exception
' Return New DocumentResult(ex.Message)
' End Try
'End Function
#End Region
#Region "Document"
Public Function ImportFile(FileInfo As FileInfo, Contents() As Byte, [Readonly] As Boolean, RetentionPeriod As Integer) As DocumentResult2 Implements IEDMIService.ImportFile
Dim oFilePath = Path.Combine(AppConfig.ContainerPath, FileInfo.Name)
Dim oDocument = New DocumentResult2.DocumentObject() With {.FileName = FileInfo.Name}
Try
_logger.Info("Saving file [{0}] to path [{1}]", FileInfo.Name, oFilePath)
Using oStream = New FileStream(oFilePath, FileMode.CreateNew)
oStream.Write(Contents, 0, Contents.Length)
oStream.Flush(True)
oStream.Close()
End Using
Dim oAttributes = IO.File.GetAttributes(oFilePath) Or FileAttributes.ReadOnly
If RetentionPeriod Then
_logger.Info("Setting LastAccessTime")
IO.File.SetLastAccessTime(oFilePath, Date.Now.AddYears(30))
End If
If [Readonly] Then
_logger.Info("Setting ReadOnly Attribute")
IO.File.SetAttributes(oFilePath, oAttributes)
End If
Return New DocumentResult2(oDocument)
Catch ex As Exception
_logger.Error(ex)
Return New DocumentResult2(ex.Message)
End Try
End Function
#End Region
#Region "Index"
Public Function NewFileIndex(DocObject As DocumentObject, Syskey As String, LanguageCode As String, Value As String) As IndexResult Implements IEDMIService.NewFileIndex
Try
Dim oSQL = $"SELECT FNIDB_NEW_DOC_VALUE({DocObject.DocumentId},'{Syskey}','{LanguageCode}','{Value}','{_username}') FROM RDB$DATABASE;"
Dim oIndexId As Int64 = Database.GetScalarValue(oSQL)
Return New IndexResult(oIndexId)
Catch ex As Exception
_logger.Error(ex)
Return New IndexResult(ex.Message)
End Try
End Function
#End Region
End Class

View File

@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A8C3F298-76AB-4359-AB3C-986E313B4336}</ProjectGuid>
<OutputType>Exe</OutputType>
<StartupObject>DigitalData.Services.EDMIService.WindowsService</StartupObject>
<RootNamespace>DigitalData.Services.EDMIService</RootNamespace>
<AssemblyName>EDMIService</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Console</MyType>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>EDMIService.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>EDMIService.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="FirebirdSql.Data.FirebirdClient, Version=6.4.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL">
<HintPath>..\..\packages\FirebirdSql.Data.FirebirdClient.6.4.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Transactions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="AppConfig.vb" />
<Compile Include="Results\BaseResult.vb" />
<Compile Include="Results\ContainerResult.vb" />
<Compile Include="Results\DocumentResult.vb" />
<Compile Include="Exceptions.vb" />
<Compile Include="Results\DatabaseResult.vb" />
<Compile Include="EDMIService.vb" />
<Compile Include="Results\DocumentResult2.vb" />
<Compile Include="Results\IndexResult.vb" />
<Compile Include="WindowsService.vb">
<SubType>Component</SubType>
</Compile>
<Compile Include="IEDMIService.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="ProjectInstaller.vb">
<SubType>Component</SubType>
</Compile>
<Compile Include="Request.vb" />
<Compile Include="SettingsModule.vb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="ProjectInstaller.resx">
<DependentUpon>ProjectInstaller.vb</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="App.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Modules.Database\Database.vbproj">
<Project>{EAF0EA75-5FA7-485D-89C7-B2D843B03A96}</Project>
<Name>Database</Name>
</ProjectReference>
<ProjectReference Include="..\..\Modules.EDMIAPI\EDMI.API.vbproj">
<Project>{5B1171DC-FFFE-4813-A20D-786AAE47B320}</Project>
<Name>EDMI.API</Name>
</ProjectReference>
<ProjectReference Include="..\..\Modules.Filesystem\Filesystem.vbproj">
<Project>{991D0231-4623-496D-8BD0-9CA906029CBC}</Project>
<Name>Filesystem</Name>
</ProjectReference>
<ProjectReference Include="..\..\Modules.Logging\Logging.vbproj">
<Project>{903B2D7D-3B80-4BE9-8713-7447B704E1B0}</Project>
<Name>Logging</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

View File

@@ -0,0 +1,61 @@
Imports System.IO
Imports System.ServiceModel
Imports DigitalData.Modules.Filesystem
<ServiceContract([Namespace]:="http://DigitalData.Services.EDMIService")>
Interface IEDMIService
#Region "Heartbeat"
<OperationContract>
Function Heartbeat() As Boolean
#End Region
#Region "Database"
<OperationContract>
Function CreateDatabaseRequest(Name As String, Optional Debug As Boolean = False) As String
<OperationContract>
Sub CloseDatabaseRequest()
<OperationContract>
Function ReturnDatatable(SQL As String) As TableResult
<OperationContract>
Function ReturnScalar(SQL As String) As ScalarResult
<OperationContract>
Function ExecuteNonQuery(SQL As String) As NonQueryResult
#End Region
#Region "Document (with FileContainer)"
'<OperationContract>
'Function NewFile(FileName As String, Contents As Byte()) As DocumentResult
'<OperationContract>
'Function UpdateFile(DocObject As DocumentObject, Contents As Byte()) As DocumentResult
'<OperationContract>
'Function GetFile(DocObject As DocumentObject) As DocumentResult
'<OperationContract>
'Function DeleteFile(DocObject As DocumentObject) As Boolean
'<OperationContract>
'Function GetDocumentByDocumentId(DocumentId As Int64) As DocumentResult
'<OperationContract>
'Function GetDocumentByContainerId(ContainerId As String) As DocumentResult
#End Region
#Region "Document (New)"
<OperationContract>
Function ImportFile(FileInfo As FileInfo, Contents As Byte(), [ReadOnly] As Boolean, RetentionTime As Integer) As DocumentResult2
#End Region
#Region "Index"
<OperationContract>
Function NewFileIndex(DocObject As DocumentObject, Syskey As String, LanguageCode As String, Value As String) As IndexResult
#End Region
End Interface

View File

@@ -52,7 +52,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="Quartz, Version=3.0.7.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL"> <Reference Include="Quartz, Version=3.0.7.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
<HintPath>..\packages\Quartz.3.0.7\lib\net452\Quartz.dll</HintPath> <HintPath>..\packages\Quartz.3.0.7\lib\net452\Quartz.dll</HintPath>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
<package id="Quartz" version="3.0.7" targetFramework="net461" /> <package id="Quartz" version="3.0.7" targetFramework="net461" />
</packages> </packages>

View File

@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "3.1.3",
"commands": [
"dotnet-ef"
]
}
}
}

View File

@@ -8,6 +8,8 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using DigitalData.Modules.Interfaces; using DigitalData.Modules.Interfaces;
using DigitalData.Modules.Logging; using DigitalData.Modules.Logging;
using static DigitalData.Modules.Interfaces.Exceptions;
using static DigitalData.Modules.Interfaces.ZUGFeRDInterface;
namespace ZUGFeRDRESTService.Controllers namespace ZUGFeRDRESTService.Controllers
{ {
@@ -36,9 +38,23 @@ namespace ZUGFeRDRESTService.Controllers
public ValidationResponse() public ValidationResponse()
{ {
status = RESPONSE_OK; status = RESPONSE_OK;
message = String.Empty; message = string.Empty;
errors = new List<string>(); errors = new List<string>();
} }
public ValidationResponse(string Status, string Message)
{
status = Status;
message = Message;
errors = new List<string>();
}
public ValidationResponse(string Status, string Message, List<String> Errors)
{
status = Status;
message = Message;
errors = Errors;
}
} }
public ValidationController(ILogging logging, IDatabase database) public ValidationController(ILogging logging, IDatabase database)
@@ -61,66 +77,94 @@ namespace ZUGFeRDRESTService.Controllers
} }
/// <summary> /// <summary>
/// POST: api/Validation /// POST: /api/validation
/// </summary> /// </summary>
/// <param name="files">This parameter's name needs to correspond to the html form's file-input name</param> /// <param name="files">This parameter's name needs to correspond to the html form's file-input name</param>
[HttpPost] [HttpPost]
public async Task<ValidationResponse> Post(IFormFile file, string user_id) public async Task<ValidationResponse> Post(IFormFile file, string user_id)
{ {
string oFilePath; _logger.Debug("Start processing request to ValidationController");
string oFileName;
oFilePath = Path.Combine(Path.GetTempPath(), file.FileName);
oFileName = file.FileName;
using FileStream oStream = new FileStream(oFilePath, FileMode.Create);
await file.CopyToAsync(oStream);
CrossIndustryDocumentType oDocument; CrossIndustryDocumentType oDocument;
PropertyValues.CheckPropertyValuesResult oResult = new PropertyValues.CheckPropertyValuesResult();
try try
{ {
oDocument = _zugferd.ExtractZUGFeRDFileWithGDPicture(oFilePath); using Stream oStream = file.OpenReadStream();
}
catch (Exception ex)
{
_logger.Error(ex);
return new ValidationResponse()
{ {
status = RESPONSE_ERROR, _logger.Debug("Extracting ZUGFeRD Data from file [{0}]", file.FileName);
message = "The uploaded file is not a valid ZUGFeRD Invoice!"
};
}
try oDocument = _zugferd.ExtractZUGFeRDFileWithGDPicture(oStream);
{
PropertyValues.CheckPropertyValuesResult oResult = _props.CheckPropertyValues(oDocument, _propertyMap, "MESSAGEID"); _logger.Debug("Checking ZUGFeRD Data against the database");
oResult = _props.CheckPropertyValues(oDocument, _propertyMap, "MESSAGEID");
_logger.Debug("Result of checking against the database: {0} valid properties, {1} missing properties",
oResult.ValidProperties.Count, oResult.MissingProperties.Count);
if (oResult.MissingProperties.Count > 0)
{
throw new ZUGFeRDExecption(ZUGFeRDInterface.ErrorType.MissingProperties,
"Die hochgeladene Datei ist eine gültige ZUGFeRD-Rechnung, allerdings fehlen benötigte Daten.");
}
string oMessage = "Die hochgeladene Datei ist eine gültige-ZUGFeRD Rechnung";
_logger.Debug($"Replying with: [{oMessage}]");
if (oResult.MissingProperties.Count > 0)
{
return new ValidationResponse() return new ValidationResponse()
{ {
status = RESPONSE_ERROR, status = RESPONSE_OK,
message = "The uploaded file is a valid ZUGFeRD Invoice but missing some properties!", message = oMessage
errors = oResult.MissingProperties
}; };
} };
}
catch (ZUGFeRDExecption ex)
{
_logger.Error(ex);
// Determine which message should be sent in the response
string oMessage = ex.ErrorType switch
{
ErrorType.NoValidFile => "Die hochgeladene Datei ist keine gültige Datei.",
ErrorType.NoZugferd => "Die hochgeladene Datei ist keine ZUGFeRD-Rechnung.",
ErrorType.NoValidZugferd => "Die hochgeladene Datei ist keine gültige ZUGFeRD-Rechnung.",
ErrorType.MissingProperties => "Die hochgeladene Datei ist eine gültige ZUGFeRD-Rechnung, jedoch fehlen einige Metadaten",
_ => "Die hochgeladene Datei kann nicht validiert werden.",
};
// Determine if any errors should be sent in the response
List<string> oErrors = ex.ErrorType switch
{
// Errors contains the list of missing fields
ErrorType.MissingProperties => oResult.MissingProperties,
_ => new List<string>()
};
_logger.Debug($"Replying with: [{oMessage}]");
return new ValidationResponse()
{
status = RESPONSE_ERROR,
message = oMessage,
errors = oErrors
};
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.Error(ex); _logger.Error(ex);
string oMessage = "Die hochgeladene Datei kann nicht validiert werden, weil ein unbekannter Fehler aufgetreten ist.";
_logger.Debug($"Replying with: [{oMessage}]");
return new ValidationResponse() return new ValidationResponse()
{ {
status = RESPONSE_ERROR, status = RESPONSE_ERROR,
message = "The uploaded file is not a valid ZUGFeRD Invoice!" message = oMessage
}; };
} }
return new ValidationResponse()
{
status = RESPONSE_OK,
message = "The uploaded files is a valid ZUGFeRD Invoice!"
};
} }
} }
} }

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Diese Datei wird vom Veröffentlichungs-/Paketierungsprozess Ihres Webprojekts verwendet. Sie können das Verhalten dieses Prozesses anpassen,
indem Sie diese MSBuild-Datei bearbeiten. Weitere Informationen hierzu finden Sie unter https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<PublishProvider>FileSystem</PublishProvider>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>fd50590a-59c1-4798-ad90-419a588dce76</ProjectGuid>
<publishUrl>bin\Release\netcoreapp3.1\publish\</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>

View File

@@ -2,6 +2,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<StartupObject>ZUGFeRDRESTService.Program</StartupObject>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@@ -19,5 +20,11 @@
<ProjectReference Include="..\..\Modules.Logging\Logging.vbproj" /> <ProjectReference Include="..\..\Modules.Logging\Logging.vbproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Update="appsettings.Development.json">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project> </Project>

View File

@@ -5,5 +5,17 @@
"Microsoft": "Warning", "Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information" "Microsoft.Hosting.Lifetime": "Information"
} }
},
"Config": {
"LogPath": "E:\\ZUGFeRDRESTService",
"LogDebug": true,
"Name": "ZUGFeRD REST API",
"MSSQLConnectionString": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM_TEST;User Id=sa;Password=dd;",
"Firebird": {
"Datasource": "172.24.12.41",
"Database": "172.24.12.41:E:\\DB\\Firebird\\Databases\\EDMI_TEMPLATE\\EDMI_MASTER.FDB",
"Username": "SYSDBA",
"Password": "dd"
}
} }
} }

View File

@@ -11,12 +11,12 @@
"LogPath": "E:\\ZUGFeRDRESTService", "LogPath": "E:\\ZUGFeRDRESTService",
"LogDebug": true, "LogDebug": true,
"Name": "ZUGFeRD REST API", "Name": "ZUGFeRD REST API",
"MSSQLConnectionString": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM_TEST;User Id=sa;Password=dd;", "MSSQLConnectionString": "<MSSQLSERVER-CONNECTIONSTRING>",
"Firebird": { "Firebird": {
"Datasource": "172.24.12.41", "Datasource": "<FIREBIRDSERVER-IP>",
"Database": "172.24.12.41:E:\\DB\\Firebird\\Databases\\EDMI_TEMPLATE\\EDMI_MASTER.FDB", "Database": "<FIREBIRDSERVER-IP>:<FIREBIRDSERVER-DBPATH>",
"Username": "SYSDBA", "Username": "<FIREBIRDSERVER-USERNAME>",
"Password": "dd" "Password": "<FIREBIRDSERVER-PASSWORD>"
} }
} }
} }

View File

@@ -45,7 +45,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.0\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="NLog" version="4.6.8" targetFramework="net461" /> <package id="NLog" version="4.7.0" targetFramework="net461" />
</packages> </packages>