Compare commits
2 Commits
4c783fbbcb
...
0032ee9941
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0032ee9941 | ||
|
|
091dc8f726 |
@@ -5,25 +5,26 @@ Imports GdPicture14
|
|||||||
Public Class Search
|
Public Class Search
|
||||||
Inherits BaseClass
|
Inherits BaseClass
|
||||||
|
|
||||||
Public Sub New(pLogConfig As LogConfig, pGDViewer As GdViewer)
|
|
||||||
MyBase.New(pLogConfig)
|
|
||||||
_Viewer = pGDViewer
|
|
||||||
_Viewer.MouseMode = ViewerMouseMode.MouseModeDefault
|
|
||||||
|
|
||||||
AddHandler _Viewer.PageDisplayed, AddressOf Viewer_PageDisplayed
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Property SearchQuery As String = ""
|
Public Property SearchQuery As String = ""
|
||||||
Public Property CaseSensitive As Boolean = False
|
Public Property CaseSensitive As Boolean = False
|
||||||
Public Property WholeWords As Boolean = False
|
Public Property WholeWords As Boolean = False
|
||||||
|
|
||||||
Private _Viewer As GdViewer = Nothing
|
Private _Viewer As GdViewer = Nothing
|
||||||
|
Private _AnnotationManager As New AnnotationManager()
|
||||||
|
|
||||||
Private _CurrentPage As Integer = 0
|
Private _CurrentPage As Integer = 0
|
||||||
Private _CurrentQuery As String = ""
|
Private _CurrentQuery As String = ""
|
||||||
Private _CurrentOccurrenceCount = 0
|
Private _CurrentOccurrenceCount = 0
|
||||||
Private _CurrentSelectedOccurrence = 0
|
Private _CurrentSelectedOccurrence = 0
|
||||||
|
|
||||||
|
Public Sub New(pLogConfig As LogConfig, pGDViewer As GdViewer)
|
||||||
|
MyBase.New(pLogConfig)
|
||||||
|
_Viewer = pGDViewer
|
||||||
|
_AnnotationManager.InitFromGdViewer(pGDViewer)
|
||||||
|
|
||||||
|
AddHandler _Viewer.PageDisplayed, AddressOf Viewer_PageDisplayed
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Sub SearchAll(pQuery As String)
|
Public Sub SearchAll(pQuery As String)
|
||||||
' Exit, if query has not changed
|
' Exit, if query has not changed
|
||||||
If _CurrentQuery = pQuery Then
|
If _CurrentQuery = pQuery Then
|
||||||
@@ -111,7 +112,17 @@ Public Class Search
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DoSearchText()
|
Private Sub DoSearchText()
|
||||||
|
|
||||||
|
|
||||||
_Viewer.SearchText(_CurrentQuery, 0, CaseSensitive, WholeWords)
|
_Viewer.SearchText(_CurrentQuery, 0, CaseSensitive, WholeWords)
|
||||||
|
|
||||||
|
Dim oRegionCount = _Viewer.RegionCount()
|
||||||
|
For index = 1 To oRegionCount
|
||||||
|
Dim oId = _Viewer.GetRegionID(index)
|
||||||
|
_Viewer.SetRegionEditable(oId, False)
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
_CurrentOccurrenceCount = _Viewer.GetTextOccurrenceCount(_CurrentPage, _CurrentQuery, CaseSensitive, WholeWords)
|
_CurrentOccurrenceCount = _Viewer.GetTextOccurrenceCount(_CurrentPage, _CurrentQuery, CaseSensitive, WholeWords)
|
||||||
_CurrentSelectedOccurrence = 0
|
_CurrentSelectedOccurrence = 0
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ Partial Class DocumentViewer
|
|||||||
'
|
'
|
||||||
'txtSearch
|
'txtSearch
|
||||||
'
|
'
|
||||||
Me.txtSearch.Caption = "BarEditItem1"
|
Me.txtSearch.Caption = "Suchtext"
|
||||||
Me.txtSearch.Edit = Me.RepositoryItemTextEdit3
|
Me.txtSearch.Edit = Me.RepositoryItemTextEdit3
|
||||||
Me.txtSearch.Id = 27
|
Me.txtSearch.Id = 27
|
||||||
Me.txtSearch.Name = "txtSearch"
|
Me.txtSearch.Name = "txtSearch"
|
||||||
@@ -337,14 +337,14 @@ Partial Class DocumentViewer
|
|||||||
'
|
'
|
||||||
'btnSearch2
|
'btnSearch2
|
||||||
'
|
'
|
||||||
Me.btnSearch2.Caption = "BarButtonItem3"
|
Me.btnSearch2.Caption = "Text suchen"
|
||||||
Me.btnSearch2.Id = 32
|
Me.btnSearch2.Id = 32
|
||||||
Me.btnSearch2.ImageOptions.SvgImage = CType(resources.GetObject("btnSearch2.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
Me.btnSearch2.ImageOptions.SvgImage = CType(resources.GetObject("btnSearch2.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||||
Me.btnSearch2.Name = "btnSearch2"
|
Me.btnSearch2.Name = "btnSearch2"
|
||||||
'
|
'
|
||||||
'btnPrevHighlight
|
'btnPrevHighlight
|
||||||
'
|
'
|
||||||
Me.btnPrevHighlight.Caption = "BarButtonItem1"
|
Me.btnPrevHighlight.Caption = "Vorheriges Ergebnis"
|
||||||
Me.btnPrevHighlight.Enabled = False
|
Me.btnPrevHighlight.Enabled = False
|
||||||
Me.btnPrevHighlight.Id = 28
|
Me.btnPrevHighlight.Id = 28
|
||||||
Me.btnPrevHighlight.ImageOptions.SvgImage = CType(resources.GetObject("btnPrevHighlight.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
Me.btnPrevHighlight.ImageOptions.SvgImage = CType(resources.GetObject("btnPrevHighlight.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||||
@@ -352,7 +352,7 @@ Partial Class DocumentViewer
|
|||||||
'
|
'
|
||||||
'btnNextHighlight
|
'btnNextHighlight
|
||||||
'
|
'
|
||||||
Me.btnNextHighlight.Caption = "BarButtonItem2"
|
Me.btnNextHighlight.Caption = "Nächstes Ergebnis"
|
||||||
Me.btnNextHighlight.Enabled = False
|
Me.btnNextHighlight.Enabled = False
|
||||||
Me.btnNextHighlight.Id = 29
|
Me.btnNextHighlight.Id = 29
|
||||||
Me.btnNextHighlight.ImageOptions.SvgImage = CType(resources.GetObject("btnNextHighlight.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
Me.btnNextHighlight.ImageOptions.SvgImage = CType(resources.GetObject("btnNextHighlight.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||||
|
|||||||
Reference in New Issue
Block a user