MS Init DocumentViewer
This commit is contained in:
@@ -90,23 +90,34 @@ Public Class DocumentViewer
|
||||
''' </summary>
|
||||
''' <param name="pLogConfig">A LogConfig object</param>
|
||||
''' <param name="pLicenseKey">The GDPicture.NET License Key</param>
|
||||
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
|
||||
|
||||
''' <summary>
|
||||
''' 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("."))
|
||||
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.9.8.0")>
|
||||
<Assembly: AssemblyVersion("1.9.8.1")>
|
||||
<Assembly: AssemblyFileVersion("1.9.8.0")>
|
||||
|
||||
Reference in New Issue
Block a user