jj
This commit is contained in:
parent
e873113d8a
commit
4c783fbbcb
@ -161,5 +161,11 @@
|
||||
<Content Include="mail.ico" />
|
||||
<None Include="Resources\save as.svg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Services.ZUGFeRDService\DDZUGFeRDService.vbproj">
|
||||
<Project>{7deec36e-ea5f-4711-ad1e-fd8894f4ad77}</Project>
|
||||
<Name>DDZUGFeRDService</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
@ -177,5 +177,11 @@
|
||||
<ItemGroup>
|
||||
<None Include="Resources\action_add_16xLG.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Controls.ChatAddUser\ChatAddUser.vbproj">
|
||||
<Project>{f0a807cc-be14-4b5b-9200-27c16156bd8a}</Project>
|
||||
<Name>ChatAddUser</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
@ -35,15 +35,23 @@ Public Class Search
|
||||
|
||||
' Reset previous highlights, then search for the new query
|
||||
_Viewer.RemoveAllRegions()
|
||||
_Viewer.SearchText(_CurrentQuery, 0, CaseSensitive, WholeWords)
|
||||
DoSearchText()
|
||||
|
||||
' Select the next occurrence
|
||||
NextHighlight()
|
||||
End Sub
|
||||
|
||||
Public Sub NextHighlight()
|
||||
' This also applies when the page has *NO* occurrences, so 0 = 0
|
||||
If _CurrentOccurrenceCount = _CurrentSelectedOccurrence Then
|
||||
' If there are no occurrences on the current page, got to the *next page*
|
||||
While _CurrentOccurrenceCount = _CurrentSelectedOccurrence And _CurrentPage < _Viewer.PageCount
|
||||
While _CurrentOccurrenceCount = _CurrentSelectedOccurrence And _CurrentPage <= _Viewer.PageCount
|
||||
If _CurrentPage = _Viewer.PageCount Then
|
||||
_Viewer.DisplayFirstPage()
|
||||
Else
|
||||
_Viewer.DisplayNextPage()
|
||||
End If
|
||||
|
||||
End While
|
||||
|
||||
' Safeguard against selecting a non-existing occurrence on the last page
|
||||
@ -61,8 +69,13 @@ Public Class Search
|
||||
Public Sub PrevHighlight()
|
||||
If _CurrentOccurrenceCount = 0 Or _CurrentSelectedOccurrence = 1 Then
|
||||
|
||||
While (_CurrentOccurrenceCount = 0 Or _CurrentSelectedOccurrence = 1) And _CurrentPage > 1
|
||||
While (_CurrentOccurrenceCount = 0 Or _CurrentSelectedOccurrence = 1) And _CurrentPage >= 1
|
||||
If _CurrentPage = 1 Then
|
||||
_Viewer.DisplayLastPage()
|
||||
Else
|
||||
_Viewer.DisplayPreviousPage()
|
||||
End If
|
||||
|
||||
End While
|
||||
|
||||
If _CurrentOccurrenceCount > 0 Then
|
||||
@ -73,26 +86,6 @@ Public Class Search
|
||||
' Otherwise just select the previous occurrence
|
||||
SelectHighlight(_CurrentSelectedOccurrence - 1)
|
||||
End If
|
||||
|
||||
'' If no occurrence found on the current page,
|
||||
'' skip to the *previous* page to look there
|
||||
'If _CurrentOccurrenceCount = 0 Then
|
||||
' While _CurrentOccurrenceCount = 0 And _CurrentPage > 1
|
||||
' _Viewer.DisplayPreviousPage()
|
||||
' End While
|
||||
|
||||
'ElseIf _CurrentSelectedOccurrence = 1 Then
|
||||
' ' Need to switch to the previous *page*
|
||||
' ' and highlight the last occurrence there
|
||||
' If _CurrentPage > 1 Then
|
||||
' _Viewer.DisplayPreviousPage()
|
||||
|
||||
' SelectHighlight(_CurrentOccurrenceCount)
|
||||
' End If
|
||||
'Else
|
||||
' ' Otherwise just select the previous occurrence
|
||||
' SelectHighlight(_CurrentSelectedOccurrence - 1)
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Private Sub SelectHighlight(pOccurrence As Integer)
|
||||
@ -112,11 +105,15 @@ Public Class Search
|
||||
_CurrentPage = _Viewer.CurrentPage
|
||||
|
||||
If _CurrentQuery.Length > 0 Then
|
||||
_Viewer.SearchText(_CurrentQuery, 0, CaseSensitive, WholeWords)
|
||||
_CurrentOccurrenceCount = _Viewer.GetTextOccurrenceCount(_CurrentPage, _CurrentQuery, CaseSensitive, WholeWords)
|
||||
_CurrentSelectedOccurrence = 0
|
||||
DoSearchText()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DoSearchText()
|
||||
_Viewer.SearchText(_CurrentQuery, 0, CaseSensitive, WholeWords)
|
||||
_CurrentOccurrenceCount = _Viewer.GetTextOccurrenceCount(_CurrentPage, _CurrentQuery, CaseSensitive, WholeWords)
|
||||
_CurrentSelectedOccurrence = 0
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
45
Controls.DocumentViewer/DocumentViewer.Designer.vb
generated
45
Controls.DocumentViewer/DocumentViewer.Designer.vb
generated
@ -63,7 +63,7 @@ Partial Class DocumentViewer
|
||||
Me.RepositoryItemSearchControl1 = New DevExpress.XtraEditors.Repository.RepositoryItemSearchControl()
|
||||
Me.SpreadsheetControl1 = New DevExpress.XtraSpreadsheet.SpreadsheetControl()
|
||||
Me.PrintDocument1 = New System.Drawing.Printing.PrintDocument()
|
||||
Me.LabelControl1 = New DevExpress.XtraEditors.LabelControl()
|
||||
Me.lbFileNotLoaded = New DevExpress.XtraEditors.LabelControl()
|
||||
CType(Me.BarManager1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.RepositoryItemTextEdit2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.RepositoryItemTextEdit3, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@ -139,7 +139,7 @@ Partial Class DocumentViewer
|
||||
Me.GdViewer.ScrollLargeChange = CType(50, Short)
|
||||
Me.GdViewer.ScrollSmallChange = CType(1, Short)
|
||||
Me.GdViewer.SilentMode = True
|
||||
Me.GdViewer.Size = New System.Drawing.Size(1079, 557)
|
||||
Me.GdViewer.Size = New System.Drawing.Size(1012, 557)
|
||||
Me.GdViewer.TabIndex = 0
|
||||
Me.GdViewer.ViewRotation = System.Drawing.RotateFlipType.RotateNoneFlipNone
|
||||
Me.GdViewer.Zoom = 1.0R
|
||||
@ -364,7 +364,7 @@ Partial Class DocumentViewer
|
||||
Me.barDockControlTop.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.barDockControlTop.Location = New System.Drawing.Point(0, 0)
|
||||
Me.barDockControlTop.Manager = Me.BarManager1
|
||||
Me.barDockControlTop.Size = New System.Drawing.Size(1079, 33)
|
||||
Me.barDockControlTop.Size = New System.Drawing.Size(1012, 33)
|
||||
'
|
||||
'barDockControlBottom
|
||||
'
|
||||
@ -372,7 +372,7 @@ Partial Class DocumentViewer
|
||||
Me.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||
Me.barDockControlBottom.Location = New System.Drawing.Point(0, 590)
|
||||
Me.barDockControlBottom.Manager = Me.BarManager1
|
||||
Me.barDockControlBottom.Size = New System.Drawing.Size(1079, 0)
|
||||
Me.barDockControlBottom.Size = New System.Drawing.Size(1012, 0)
|
||||
'
|
||||
'barDockControlLeft
|
||||
'
|
||||
@ -386,7 +386,7 @@ Partial Class DocumentViewer
|
||||
'
|
||||
Me.barDockControlRight.CausesValidation = False
|
||||
Me.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right
|
||||
Me.barDockControlRight.Location = New System.Drawing.Point(1079, 33)
|
||||
Me.barDockControlRight.Location = New System.Drawing.Point(1012, 33)
|
||||
Me.barDockControlRight.Manager = Me.BarManager1
|
||||
Me.barDockControlRight.Size = New System.Drawing.Size(0, 557)
|
||||
'
|
||||
@ -441,25 +441,30 @@ Partial Class DocumentViewer
|
||||
Me.SpreadsheetControl1.Text = "SpreadsheetControl1"
|
||||
Me.SpreadsheetControl1.Visible = False
|
||||
'
|
||||
'LabelControl1
|
||||
'lbFileNotLoaded
|
||||
'
|
||||
Me.LabelControl1.Appearance.Options.UseTextOptions = True
|
||||
Me.LabelControl1.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center
|
||||
Me.LabelControl1.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center
|
||||
Me.LabelControl1.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None
|
||||
Me.LabelControl1.Location = New System.Drawing.Point(340, 222)
|
||||
Me.LabelControl1.Name = "LabelControl1"
|
||||
Me.LabelControl1.Size = New System.Drawing.Size(409, 72)
|
||||
Me.LabelControl1.TabIndex = 14
|
||||
Me.LabelControl1.Tag = "Die Datei konnte nicht gefunden werden: {0}"
|
||||
Me.LabelControl1.Text = "Die Datei konnte nicht gefunden werden: {0}"
|
||||
Me.LabelControl1.Visible = False
|
||||
Me.lbFileNotLoaded.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lbFileNotLoaded.Appearance.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lbFileNotLoaded.Appearance.Options.UseFont = True
|
||||
Me.lbFileNotLoaded.Appearance.Options.UseTextOptions = True
|
||||
Me.lbFileNotLoaded.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center
|
||||
Me.lbFileNotLoaded.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center
|
||||
Me.lbFileNotLoaded.AutoEllipsis = True
|
||||
Me.lbFileNotLoaded.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None
|
||||
Me.lbFileNotLoaded.Location = New System.Drawing.Point(3, 74)
|
||||
Me.lbFileNotLoaded.Name = "lbFileNotLoaded"
|
||||
Me.lbFileNotLoaded.Size = New System.Drawing.Size(1006, 72)
|
||||
Me.lbFileNotLoaded.TabIndex = 14
|
||||
Me.lbFileNotLoaded.Tag = ""
|
||||
Me.lbFileNotLoaded.Text = "Die Datei konnte nicht geladen werden"
|
||||
Me.lbFileNotLoaded.Visible = False
|
||||
'
|
||||
'DocumentViewer
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(Me.LabelControl1)
|
||||
Me.Controls.Add(Me.lbFileNotLoaded)
|
||||
Me.Controls.Add(Me.RichEditControl1)
|
||||
Me.Controls.Add(Me.SpreadsheetControl1)
|
||||
Me.Controls.Add(Me.GdViewer)
|
||||
@ -468,7 +473,7 @@ Partial Class DocumentViewer
|
||||
Me.Controls.Add(Me.barDockControlBottom)
|
||||
Me.Controls.Add(Me.barDockControlTop)
|
||||
Me.Name = "DocumentViewer"
|
||||
Me.Size = New System.Drawing.Size(1079, 590)
|
||||
Me.Size = New System.Drawing.Size(1012, 590)
|
||||
CType(Me.BarManager1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.RepositoryItemTextEdit2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.RepositoryItemTextEdit3, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
@ -518,7 +523,7 @@ Partial Class DocumentViewer
|
||||
Friend WithEvents btnPrevHighlight As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents btnNextHighlight As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents RepositoryItemSearchControl1 As DevExpress.XtraEditors.Repository.RepositoryItemSearchControl
|
||||
Friend WithEvents LabelControl1 As DevExpress.XtraEditors.LabelControl
|
||||
Friend WithEvents lbFileNotLoaded As DevExpress.XtraEditors.LabelControl
|
||||
Friend WithEvents btnSearch As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents btnSearch2 As DevExpress.XtraBars.BarButtonItem
|
||||
End Class
|
||||
|
||||
@ -470,6 +470,8 @@ Public Class DocumentViewer
|
||||
Dim oFileInfo = New FileInfo(FilePath)
|
||||
Dim oExtension As String = oFileInfo.Extension.ToUpper
|
||||
|
||||
lbFileNotLoaded.Visible = False
|
||||
|
||||
RichEditControl1.Visible = False
|
||||
RichEditControl1.Dock = DockStyle.None
|
||||
|
||||
@ -504,7 +506,11 @@ Public Class DocumentViewer
|
||||
GdViewer.ForceTemporaryMode = True
|
||||
GdViewer.AnnotationDropShadow = True
|
||||
|
||||
GdViewer.DisplayFromFile(FilePath)
|
||||
If GdViewer.DisplayFromFile(FilePath) <> GdPictureStatus.OK Then
|
||||
Dim oFileName = IO.Path.GetFileName(FilePath)
|
||||
lbFileNotLoaded.Text = String.Format("Datei konnte nicht geladen werden:{0}{1}", vbCrLf, oFileName)
|
||||
lbFileNotLoaded.Visible = True
|
||||
End If
|
||||
|
||||
End Select
|
||||
|
||||
@ -686,7 +692,10 @@ Public Class DocumentViewer
|
||||
End Sub
|
||||
|
||||
Private Sub btnSearch2_ItemClick(sender As Object, e As XtraBars.ItemClickEventArgs) Handles btnSearch2.ItemClick
|
||||
_Search.SearchAll(txtSearch.EditValue.ToString)
|
||||
If Not String.IsNullOrEmpty(txtSearch.EditValue) Then
|
||||
_Search.SearchAll(txtSearch.EditValue?.ToString)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnPrevHighlight_ItemClick(sender As Object, e As XtraBars.ItemClickEventArgs) Handles btnPrevHighlight.ItemClick
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="NLog" version="5.0.5" targetFramework="net461" />
|
||||
<package id="NLog" version="5.0.5" targetFramework="net462" />
|
||||
</packages>
|
||||
@ -330,10 +330,38 @@
|
||||
<WCFMetadata Include="Connected Services\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Controls.ChatAddUser\ChatAddUser.vbproj">
|
||||
<Project>{f0a807cc-be14-4b5b-9200-27c16156bd8a}</Project>
|
||||
<Name>ChatAddUser</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Controls.ChatControl\ChatControl.vbproj">
|
||||
<Project>{1f278760-4f6b-42e8-b82d-01d4c8618340}</Project>
|
||||
<Name>ChatControl</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Controls.ChatNewConv\ChatNewConv.vbproj">
|
||||
<Project>{86d27ffa-480f-481d-8d23-26deae92fe6c}</Project>
|
||||
<Name>ChatNewConv</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Controls.DocumentViewer\DocumentViewer.vbproj">
|
||||
<Project>{0958cddf-4a16-41f6-8837-8335f71d599c}</Project>
|
||||
<Name>DocumentViewer</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Controls.LookupGrid\LookupControl.vbproj">
|
||||
<Project>{3dcd6d1a-c830-4241-b7e4-27430e7ea483}</Project>
|
||||
<Name>LookupControl</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\GUIs.Common\Common.vbproj">
|
||||
<Project>{d20a6bf2-c7c6-4a7a-b34d-fa27d775a049}</Project>
|
||||
<Name>Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Service.EDMIService\EDMIService.vbproj">
|
||||
<Project>{a8c3f298-76ab-4359-ab3c-986e313b4336}</Project>
|
||||
<Name>EDMIService</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Services.ZUGFeRDService\DDZUGFeRDService.vbproj">
|
||||
<Project>{7deec36e-ea5f-4711-ad1e-fd8894f4ad77}</Project>
|
||||
<Name>DDZUGFeRDService</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\alignhorizontalbottom.svg" />
|
||||
|
||||
@ -4,9 +4,15 @@ Public Class frmDocView
|
||||
Private LogConfig As LogConfig
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
If String.IsNullOrEmpty(TextBox1.Text) Then
|
||||
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
|
||||
DocumentViewer1.LoadFile(OpenFileDialog1.FileName)
|
||||
TextBox1.Text = OpenFileDialog1.FileName
|
||||
DocumentViewer1.LoadFile(TextBox1.Text)
|
||||
End If
|
||||
Else
|
||||
DocumentViewer1.LoadFile(TextBox1.Text)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub frmDocView_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
Imports DigitalData.GUIs.Common
|
||||
Imports DigitalData.GUIs.Common.Base
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user