DocViewer isnothing
This commit is contained in:
parent
07332a4990
commit
4085d05368
@ -606,14 +606,20 @@ Public Class DocumentViewer
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub FitToPage()
|
Private Sub FitToPage()
|
||||||
GdViewer.ZoomMode = ViewerZoomMode.ZoomModeFitToViewer
|
If Not GdViewer Is Nothing Then
|
||||||
|
GdViewer.ZoomMode = ViewerZoomMode.ZoomModeFitToViewer
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FitToWidth()
|
Private Sub FitToWidth()
|
||||||
GdViewer.ZoomMode = ViewerZoomMode.ZoomModeWidthViewer
|
If Not GdViewer Is Nothing Then
|
||||||
|
GdViewer.ZoomMode = ViewerZoomMode.ZoomModeWidthViewer
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function DoLoadFile(Stream As Stream, Extension As String) As Boolean
|
Private Function DoLoadFile(Stream As Stream, Extension As String) As Boolean
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|
||||||
SpreadsheetControl1.Visible = False
|
SpreadsheetControl1.Visible = False
|
||||||
|
|||||||
@ -159,9 +159,41 @@ Public Class Form1
|
|||||||
|
|
||||||
If oResult = DialogResult.OK Then
|
If oResult = DialogResult.OK Then
|
||||||
Try
|
Try
|
||||||
Dim oDoc = _zugferd.ValidateZUGFeRDFileWithGDPicture(OpenFileDialog1.FileName)
|
Dim oDoc = _zugferd.ValidateZUGFeRDFileWithGDPicture(OpenFileDialog1.FileName, True)
|
||||||
|
Dim oZFResult = _zugferd.ValidateZUGFeRDDocument(oDoc)
|
||||||
Dim oZUGFERD = _zugferd.SerializeZUGFeRDDocument(oDoc)
|
Dim oZUGFERD = _zugferd.SerializeZUGFeRDDocument(oDoc)
|
||||||
Console.WriteLine()
|
WriteLog("Specification: " & oZFResult.Specification)
|
||||||
|
'WriteLog("XML-Schema: " & oResult.UsedXMLSchema)
|
||||||
|
WriteLog("Embedded File Name: " & oZFResult.DataFileName)
|
||||||
|
|
||||||
|
Dim oSpecification = oZFResult.Specification
|
||||||
|
|
||||||
|
If oSpecification = ZUGFeRDInterface.ZUGFERD_SPEC_10 Then
|
||||||
|
oSpecification = ZUGFeRDInterface.ZUGFERD_SPEC_DEFAULT
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oPropertyMap = oArgs.PropertyMapList.
|
||||||
|
Where(Function(kv) kv.Specification = oSpecification).
|
||||||
|
ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv)
|
||||||
|
|
||||||
|
Dim oResult2 = _zugferd.PropertyValues.CheckPropertyValues(oZFResult.SchemaObject, oPropertyMap, "test")
|
||||||
|
|
||||||
|
WriteLog("Valid Properties: [{0}]", oResult2.ValidProperties.Count)
|
||||||
|
For Each Prop In oResult2.ValidProperties
|
||||||
|
If Prop.Value.Length > 250 Then
|
||||||
|
WriteLog("Property: [{0}] = [{1}]", Prop.Description, Prop.Value.Substring(0, 250))
|
||||||
|
Else
|
||||||
|
WriteLog("Property: [{0}] = [{1}]", Prop.Description, Prop.Value)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
WriteLog("--------------------------------")
|
||||||
|
WriteLog("Missing Properties: [{0}]", oResult2.MissingProperties.Count)
|
||||||
|
For Each Prop In oResult2.MissingProperties
|
||||||
|
WriteLog("Missing Property: [{0}]", Prop.ToString) ''Prop.Description
|
||||||
|
Next
|
||||||
|
|
||||||
|
WriteLog("--------------------------------")
|
||||||
Catch ex As DigitalData.Modules.Interfaces.Exceptions.ZUGFeRDExecption
|
Catch ex As DigitalData.Modules.Interfaces.Exceptions.ZUGFeRDExecption
|
||||||
Dim oErrorCode = GetRejectionCodeNumber(ex.ErrorCode)
|
Dim oErrorCode = GetRejectionCodeNumber(ex.ErrorCode)
|
||||||
Dim oMessage = oErrorCode + " - (" + ex.ErrorCode.ToString() + ") - " + ex.Message
|
Dim oMessage = oErrorCode + " - (" + ex.ErrorCode.ToString() + ") - " + ex.Message
|
||||||
@ -169,6 +201,7 @@ Public Class Form1
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message)
|
MsgBox(ex.Message)
|
||||||
End Try
|
End Try
|
||||||
|
MsgBox("Finished - check log")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@ -227,7 +260,7 @@ Public Class Form1
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
If oDialogResult = DialogResult.OK Then
|
If oDialogResult = DialogResult.OK Then
|
||||||
Dim oDoc = _zugferd.ValidateZUGFeRDFileWithGDPicture(OpenFileDialog1.FileName)
|
Dim oDoc = _zugferd.ValidateZUGFeRDFileWithGDPicture(OpenFileDialog1.FileName, True)
|
||||||
Dim oResult = _zugferd.ValidateZUGFeRDDocument(oDoc)
|
Dim oResult = _zugferd.ValidateZUGFeRDDocument(oDoc)
|
||||||
oResult = _zugferd.SerializeZUGFeRDDocument(oDoc)
|
oResult = _zugferd.SerializeZUGFeRDDocument(oDoc)
|
||||||
|
|
||||||
|
|||||||
@ -17,25 +17,26 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="GdPicture" Version="14.3.16" />
|
<PackageReference Include="GdPicture" Version="14.3.18" />
|
||||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.1.1" />
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.1.1" />
|
||||||
<PackageReference Include="NLog" Version="6.0.4" />
|
<PackageReference Include="NLog" Version="6.0.4" />
|
||||||
|
<PackageReference Include="System.Data.SqlClient" Version="4.9.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="DigitalData.Modules.Config">
|
<Reference Include="DigitalData.Modules.Config">
|
||||||
<HintPath>..\..\DDModules\Config\bin\Debug\net8.0-windows\DigitalData.Modules.Config.dll</HintPath>
|
<HintPath>..\..\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Database">
|
<Reference Include="DigitalData.Modules.Database">
|
||||||
<HintPath>..\..\DDModules\Database\bin\Debug\net8.0-windows\DigitalData.Modules.Database.dll</HintPath>
|
<HintPath>..\..\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Interfaces">
|
<Reference Include="DigitalData.Modules.Interfaces">
|
||||||
<HintPath>..\..\DDModules\Interfaces\bin\Debug\net8.0-windows\DigitalData.Modules.Interfaces.dll</HintPath>
|
<HintPath>..\..\DDModules\Interfaces\bin\Debug\DigitalData.Modules.Interfaces.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Jobs">
|
<Reference Include="DigitalData.Modules.Jobs">
|
||||||
<HintPath>..\..\DDModules\Jobs\bin\Debug\net8.0-windows\DigitalData.Modules.Jobs.dll</HintPath>
|
<HintPath>..\..\DDModules\Jobs\bin\Debug\DigitalData.Modules.Jobs.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Logging">
|
<Reference Include="DigitalData.Modules.Logging">
|
||||||
<HintPath>..\..\DDModules\Logging_.NET8\bin\Debug\net8.0-windows\DigitalData.Modules.Logging.dll</HintPath>
|
<HintPath>..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user