Compare commits
2 Commits
d5911fa9be
...
d392ffb712
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d392ffb712 | ||
|
|
30b06d050d |
@@ -51,6 +51,8 @@ Public Class DocumentViewer
|
|||||||
Private _Annotations As Annotations
|
Private _Annotations As Annotations
|
||||||
Private _AnnotationsPending As Boolean = False
|
Private _AnnotationsPending As Boolean = False
|
||||||
|
|
||||||
|
Private _ToolbarSettings As New ToolbarSettings
|
||||||
|
|
||||||
Private _hide_file_info_from_user As Boolean = False
|
Private _hide_file_info_from_user As Boolean = False
|
||||||
|
|
||||||
Private _FileStream As Stream
|
Private _FileStream As Stream
|
||||||
@@ -65,6 +67,16 @@ Public Class DocumentViewer
|
|||||||
UpdateMainUi()
|
UpdateMainUi()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Class ToolbarSettings
|
||||||
|
Public Property ShowPrintButton As Boolean = True
|
||||||
|
Public Property ShowFitWidthButton As Boolean = True
|
||||||
|
Public Property ShowFitPageButton As Boolean = True
|
||||||
|
Public Property ShowZoomButton As Boolean = True
|
||||||
|
Public Property ShowRotateButton As Boolean = True
|
||||||
|
Public Property ShowFlipButton As Boolean = True
|
||||||
|
Public Property ShowSearchButton As Boolean = True
|
||||||
|
Public Property ShowSettingButton As Boolean = True
|
||||||
|
End Class
|
||||||
|
|
||||||
Public Property FileLoaded As Boolean = False
|
Public Property FileLoaded As Boolean = False
|
||||||
Public ReadOnly Property AnnotationsSaved As Boolean
|
Public ReadOnly Property AnnotationsSaved As Boolean
|
||||||
@@ -78,7 +90,7 @@ Public Class DocumentViewer
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
''' <param name="pLogConfig">A LogConfig object</param>
|
''' <param name="pLogConfig">A LogConfig object</param>
|
||||||
''' <param name="pLicenseKey">The GDPicture.NET License Key</param>
|
''' <param name="pLicenseKey">The GDPicture.NET License Key</param>
|
||||||
Public Sub Init(pLogConfig As LogConfig, pLicenseKey As String)
|
Public Sub Init(pLogConfig As LogConfig, pLicenseKey As String, pToolbarSettings As ToolbarSettings)
|
||||||
_logConfig = pLogConfig
|
_logConfig = pLogConfig
|
||||||
_logger = pLogConfig.GetLogger()
|
_logger = pLogConfig.GetLogger()
|
||||||
_email = New Email2(pLogConfig)
|
_email = New Email2(pLogConfig)
|
||||||
@@ -86,11 +98,16 @@ Public Class DocumentViewer
|
|||||||
_licenseManager.RegisterKEY(_licenseKey)
|
_licenseManager.RegisterKEY(_licenseKey)
|
||||||
_Annotations = New Annotations(pLogConfig)
|
_Annotations = New Annotations(pLogConfig)
|
||||||
_Search = New Search(pLogConfig, GdViewer)
|
_Search = New Search(pLogConfig, GdViewer)
|
||||||
|
_ToolbarSettings = pToolbarSettings
|
||||||
|
|
||||||
Dim oConfigPath = ConfigPath()
|
Dim oConfigPath = ConfigPath()
|
||||||
_Config = New ConfigManager(Of Config)(pLogConfig, oConfigPath)
|
_Config = New ConfigManager(Of Config)(pLogConfig, oConfigPath)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub Init(pLogConfig As LogConfig, pLicenseKey As String)
|
||||||
|
Init(pLogConfig, pLicenseKey, New ToolbarSettings())
|
||||||
|
End Sub
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Load a file from a path and display it
|
''' Load a file from a path and display it
|
||||||
''' </summary>
|
''' </summary>
|
||||||
@@ -646,27 +663,31 @@ Public Class DocumentViewer
|
|||||||
|
|
||||||
Select Case _ViewerMode
|
Select Case _ViewerMode
|
||||||
Case ViewerMode.GDPicture
|
Case ViewerMode.GDPicture
|
||||||
buttonPrint.Enabled = True
|
buttonPrint.Enabled = _ToolbarSettings.ShowPrintButton
|
||||||
buttonFitWidth.Enabled = True
|
buttonFitWidth.Enabled = _ToolbarSettings.ShowFitWidthButton
|
||||||
buttonFitPage.Enabled = True
|
buttonFitPage.Enabled = _ToolbarSettings.ShowFitPageButton
|
||||||
buttonZoomIn.Enabled = True
|
buttonZoomIn.Enabled = _ToolbarSettings.ShowZoomButton
|
||||||
buttonZoomOut.Enabled = True
|
buttonZoomOut.Enabled = _ToolbarSettings.ShowZoomButton
|
||||||
buttonRotateLeft.Enabled = True
|
buttonRotateLeft.Enabled = _ToolbarSettings.ShowRotateButton
|
||||||
buttonRotateRight.Enabled = True
|
buttonRotateRight.Enabled = _ToolbarSettings.ShowRotateButton
|
||||||
buttonFlipX.Enabled = True
|
buttonFlipX.Enabled = _ToolbarSettings.ShowFlipButton
|
||||||
buttonFlipY.Enabled = True
|
buttonFlipY.Enabled = _ToolbarSettings.ShowFlipButton
|
||||||
|
buttonSettings.Enabled = _ToolbarSettings.ShowSettingButton
|
||||||
|
txtSearch.Enabled = _ToolbarSettings.ShowSearchButton
|
||||||
|
btnSearch2.Enabled = _ToolbarSettings.ShowSearchButton
|
||||||
|
btnNextHighlight.Enabled = _ToolbarSettings.ShowSearchButton
|
||||||
|
btnPrevHighlight.Enabled = _ToolbarSettings.ShowSearchButton
|
||||||
buttonFirstPage.Enabled = True
|
buttonFirstPage.Enabled = True
|
||||||
buttonPrevPage.Enabled = True
|
buttonPrevPage.Enabled = True
|
||||||
buttonNextPage.Enabled = True
|
buttonNextPage.Enabled = True
|
||||||
buttonLastPage.Enabled = True
|
buttonLastPage.Enabled = True
|
||||||
buttonSettings.Enabled = True
|
|
||||||
txtCurrentPage.Enabled = True
|
txtCurrentPage.Enabled = True
|
||||||
|
|
||||||
Case ViewerMode.RichText
|
Case ViewerMode.RichText
|
||||||
buttonFitPage.Enabled = True
|
buttonFitWidth.Enabled = _ToolbarSettings.ShowFitWidthButton
|
||||||
buttonZoomIn.Enabled = True
|
buttonFitPage.Enabled = _ToolbarSettings.ShowFitPageButton
|
||||||
buttonZoomOut.Enabled = True
|
buttonZoomIn.Enabled = _ToolbarSettings.ShowZoomButton
|
||||||
buttonFitWidth.Enabled = True
|
buttonZoomOut.Enabled = _ToolbarSettings.ShowZoomButton
|
||||||
buttonNextPage.Enabled = True
|
buttonNextPage.Enabled = True
|
||||||
buttonPrevPage.Enabled = True
|
buttonPrevPage.Enabled = True
|
||||||
|
|
||||||
@@ -679,6 +700,10 @@ Public Class DocumentViewer
|
|||||||
buttonLastPage.Enabled = False
|
buttonLastPage.Enabled = False
|
||||||
buttonSettings.Enabled = False
|
buttonSettings.Enabled = False
|
||||||
txtCurrentPage.Enabled = False
|
txtCurrentPage.Enabled = False
|
||||||
|
txtSearch.Enabled = False
|
||||||
|
btnSearch2.Enabled = False
|
||||||
|
btnNextHighlight.Enabled = False
|
||||||
|
btnPrevHighlight.Enabled = False
|
||||||
|
|
||||||
Case ViewerMode.Excel
|
Case ViewerMode.Excel
|
||||||
buttonPrint.Enabled = False
|
buttonPrint.Enabled = False
|
||||||
@@ -696,6 +721,10 @@ Public Class DocumentViewer
|
|||||||
buttonLastPage.Enabled = False
|
buttonLastPage.Enabled = False
|
||||||
buttonSettings.Enabled = False
|
buttonSettings.Enabled = False
|
||||||
txtCurrentPage.Enabled = False
|
txtCurrentPage.Enabled = False
|
||||||
|
txtSearch.Enabled = False
|
||||||
|
btnSearch2.Enabled = False
|
||||||
|
btnNextHighlight.Enabled = False
|
||||||
|
btnPrevHighlight.Enabled = False
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices
|
|||||||
<Assembly: AssemblyDescription("")>
|
<Assembly: AssemblyDescription("")>
|
||||||
<Assembly: AssemblyCompany("")>
|
<Assembly: AssemblyCompany("")>
|
||||||
<Assembly: AssemblyProduct("DocumentViewer")>
|
<Assembly: AssemblyProduct("DocumentViewer")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2023")>
|
<Assembly: AssemblyCopyright("Copyright © 2024")>
|
||||||
<Assembly: AssemblyTrademark("1.9.2.0")>
|
<Assembly: AssemblyTrademark("1.9.3.0")>
|
||||||
|
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
@@ -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.9.2.0")>
|
<Assembly: AssemblyVersion("1.9.3.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.9.2.0")>
|
<Assembly: AssemblyFileVersion("1.9.3.0")>
|
||||||
|
|||||||
@@ -21,7 +21,12 @@ Public Class frmDocView
|
|||||||
|
|
||||||
Private Sub frmDocView_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub frmDocView_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
LogConfig = New LogConfig(LogConfig.PathType.Temp)
|
LogConfig = New LogConfig(LogConfig.PathType.Temp)
|
||||||
DocumentViewer1.Init(LogConfig, GDPICTURE_KEY)
|
DocumentViewer1.Init(LogConfig, GDPICTURE_KEY, New DigitalData.Controls.DocumentViewer.DocumentViewer.ToolbarSettings() With {
|
||||||
|
.ShowPrintButton = False,
|
||||||
|
.ShowRotateButton = False,
|
||||||
|
.ShowFlipButton = False,
|
||||||
|
.ShowSettingButton = False
|
||||||
|
})
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user