diff --git a/Controls.DocumentViewer/DocumentViewer.vb b/Controls.DocumentViewer/DocumentViewer.vb index 99ec7e0d..7bd7256b 100644 --- a/Controls.DocumentViewer/DocumentViewer.vb +++ b/Controls.DocumentViewer/DocumentViewer.vb @@ -90,23 +90,34 @@ Public Class DocumentViewer ''' ''' A LogConfig object ''' The GDPicture.NET License Key - Public Sub Init(pLogConfig As LogConfig, pLicenseKey As String, pToolbarSettings As ToolbarSettings) + Private Function Init(pLogConfig As LogConfig, pLicenseKey As String, pToolbarSettings As ToolbarSettings) As Boolean _logConfig = pLogConfig _logger = pLogConfig.GetLogger() - _email = New Email2(pLogConfig) - _licenseKey = pLicenseKey - _licenseManager.RegisterKEY(_licenseKey) - _Annotations = New Annotations(pLogConfig) - _Search = New Search(pLogConfig, GdViewer) - _ToolbarSettings = pToolbarSettings + Try - Dim oConfigPath = ConfigPath() - _Config = New ConfigManager(Of Config)(pLogConfig, oConfigPath) - End Sub + _email = New Email2(pLogConfig) + If pLicenseKey = String.Empty Then + _logger.Warn("License key was not provided. File [{0}] not loaded.", FileName) + Return False + End If + _licenseKey = pLicenseKey + _licenseManager.RegisterKEY(_licenseKey) + _Annotations = New Annotations(pLogConfig) + _Search = New Search(pLogConfig, GdViewer) + _ToolbarSettings = pToolbarSettings - Public Sub Init(pLogConfig As LogConfig, pLicenseKey As String) - Init(pLogConfig, pLicenseKey, New ToolbarSettings()) - End Sub + Dim oConfigPath = ConfigPath() + _Config = New ConfigManager(Of Config)(pLogConfig, oConfigPath) + Return True + Catch ex As Exception + _logger.Error(ex) + Return False + End Try + End Function + + Public Function Init(pLogConfig As LogConfig, pLicenseKey As String) As Boolean + Return Init(pLogConfig, pLicenseKey, New ToolbarSettings()) + End Function ''' ''' Load a file from a path and display it @@ -141,10 +152,7 @@ Public Class DocumentViewer Public Sub LoadFile(FileName As String, Stream As Stream) FileLoaded = False - If _licenseKey = String.Empty Then - _logger.Warn("License key was not provided. File [{0}] not loaded.", FileName) - Exit Sub - End If + Dim oExtension As String = FileName.Substring(FileName.LastIndexOf(".")) diff --git a/Controls.DocumentViewer/My Project/AssemblyInfo.vb b/Controls.DocumentViewer/My Project/AssemblyInfo.vb index 013c511e..33d01303 100644 --- a/Controls.DocumentViewer/My Project/AssemblyInfo.vb +++ b/Controls.DocumentViewer/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - + diff --git a/GUIs.Test.TestGUI/App.config b/GUIs.Test.TestGUI/App.config index 72127852..22ec8bdd 100644 --- a/GUIs.Test.TestGUI/App.config +++ b/GUIs.Test.TestGUI/App.config @@ -25,7 +25,7 @@ - + @@ -35,6 +35,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GUIs.Test.TestGUI/TestGUI.vbproj b/GUIs.Test.TestGUI/TestGUI.vbproj index fb32b4d5..80cbb200 100644 --- a/GUIs.Test.TestGUI/TestGUI.vbproj +++ b/GUIs.Test.TestGUI/TestGUI.vbproj @@ -53,6 +53,9 @@ My Project\app.manifest + + ..\packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll + @@ -110,25 +113,119 @@ ..\..\DDModules\Windream\bin\Debug\DigitalData.Modules.Windream.dll - - ..\GUIs.Test.ZUGFeRDTest\bin\Debug\GdPicture.NET.14.dll + + ..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll + + + ..\packages\DocumentFormat.OpenXml.Framework.3.2.0\lib\net46\DocumentFormat.OpenXml.Framework.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.barcode.1d.writer.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.barcode.2d.writer.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.CAD.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.CAD.DWG.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Common.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Document.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Email.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.HTML.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Formats.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Formats.Conversion.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Rendering.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.MSOfficeBinary.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenDocument.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenXML.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenXML.Templating.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.PDF.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.RTF.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.SVG.dll + + + ..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.wia.gateway.dll + True P:\Visual Studio Projekte\Bibliotheken\Limilabs\Mail.dll\Mail.dll + + ..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll + ..\packages\Microsoft.Extensions.Logging.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll + + ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll + + + ..\packages\Newtonsoft.Json.Bson.1.0.2\lib\net45\Newtonsoft.Json.Bson.dll + ..\packages\NLog.5.0.5\lib\net46\NLog.dll + + ..\packages\OpenMcdf.2.4.1\lib\net40\OpenMcdf.dll + + + ..\packages\protobuf-net.3.2.46\lib\net462\protobuf-net.dll + + + ..\packages\protobuf-net.Core.3.2.46\lib\net462\protobuf-net.Core.dll + ..\packages\Quartz.3.5.0\lib\net462\Quartz.dll + + ..\packages\RtfPipe.2.0.7677.4303\lib\net45\RtfPipe.dll + - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll + + + ..\packages\System.CodeDom.8.0.0\lib\net462\System.CodeDom.dll + + + ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll @@ -138,26 +235,50 @@ - - ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + ..\packages\System.IO.Packaging.8.0.1\lib\net462\System.IO.Packaging.dll + + + + ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll + + + ..\packages\Microsoft.AspNet.WebApi.Client.6.0.0\lib\net45\System.Net.Http.Formatting.dll - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll - - ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.Security.Cryptography.Pkcs.8.0.1\lib\net462\System.Security.Cryptography.Pkcs.dll + + + ..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll + + + ..\packages\System.Text.Json.8.0.5\lib\net462\System.Text.Json.dll + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + + ..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll + + @@ -383,11 +504,11 @@ - + Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}". - + \ No newline at end of file diff --git a/GUIs.Test.TestGUI/frmDocView.vb b/GUIs.Test.TestGUI/frmDocView.vb index 89b2996c..74c38d37 100644 --- a/GUIs.Test.TestGUI/frmDocView.vb +++ b/GUIs.Test.TestGUI/frmDocView.vb @@ -5,7 +5,7 @@ Imports GdPicture14 Public Class frmDocView Private LogConfig As LogConfig - Private Const GDPICTURE_KEY = "21182889975216572111813147150675976632" + Private Const GDPICTURE_KEY = "kG1Qf9PwmqgR8aDmIW2zI_ebj48RzqAJegRxcystEmkbTGQqfkNBdFOXIb6C_A00Ra8zZkrHdfjqzOPXK7kgkF2YDhvrqKfqh4WDug2vOt0qO31IommzkANSuLjZ4zmraoubyEVd25rE3veQ2h_j7tGIoH_LyIHmy24GaXsxdG0yCzIBMdiLbMMMDwcPY-809KeZ83Grv76OVhFvcbBWyYc251vou1N-kGg5_ZlHDgfWoY85gTLRxafjD3KS_i9ARW4BMiy36y8n7UP2jN8kGRnW_04ubpFtfjJqvtsrP_J9D0x7bqV8xtVtT5JI6dpKsVTiMgDCrIcoFSo5gCC1fw9oUopX4TDCkBQttO4-WHBlOeq9dG5Yb0otonVmJKaQA2tP6sMR-lZDs3ql_WI9t91yPWgpssrJUxSHDd27_LMTH_owJIqkF3NOJd9mYQuAv22oNKFYbH8e41pVKb8cT33Y9CgcQ_sy6YDA5PTuIRi67mjKge_nD9rd0IN213Ir9M_EFWqg9e4haWzIdHXQUo0md70kVhPX4UIH_BKJnxEEnFfoFRNMh77bB0N4jkcBEHPl-ghOERv8dOztf4vCnNpzzWvcLD2cqWIm6THy8XGGq9h4hp8aEreRleSMwv9QQAC7mjLwhQ1rBYkpUHlpTjhTLnMwHknl6HH0Z6zzmsgkRKVyfquv94Pd7QbQfZrRka0ss_48pf9p8hAywEn81Q==" Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click If String.IsNullOrEmpty(TextBox1.Text) Then diff --git a/GUIs.Test.TestGUI/packages.config b/GUIs.Test.TestGUI/packages.config index 296f5067..9698caae 100644 --- a/GUIs.Test.TestGUI/packages.config +++ b/GUIs.Test.TestGUI/packages.config @@ -1,13 +1,35 @@  - - + + + + + + + + + + + + + + - + + + + - - - + + + + + + + + + + \ No newline at end of file