top most for frmMatch, fix export for dataresultlist

This commit is contained in:
Jonathan Jenne 2019-10-29 13:03:27 +01:00
parent 44d703fcb2
commit 811613cdea
5 changed files with 43 additions and 2 deletions

View File

@ -48,6 +48,12 @@ Public Class ProfileSearches
oSQL = oPatterns.ReplaceClipboardContents(oSQL, _Params.ClipboardContents) oSQL = oPatterns.ReplaceClipboardContents(oSQL, _Params.ClipboardContents)
Dim oDatatable As DataTable = _Environment.Database.GetDatatable(oSQL, oConnectionId) Dim oDatatable As DataTable = _Environment.Database.GetDatatable(oSQL, oConnectionId)
If oDatatable Is Nothing Then
_Logger.Warn("Error in SQL-Query '{0}'", oSQL)
Continue For
End If
oDocSearches.Add(New Search() With { oDocSearches.Add(New Search() With {
.Guid = oGuid, .Guid = oGuid,
.DataTable = oDatatable, .DataTable = oDatatable,
@ -90,6 +96,12 @@ Public Class ProfileSearches
oSQL = oPatterns.ReplaceInternalValues(oSQL) oSQL = oPatterns.ReplaceInternalValues(oSQL)
Dim oDatatable As DataTable = _Environment.Database.GetDatatable(oSQL, oConnectionId) Dim oDatatable As DataTable = _Environment.Database.GetDatatable(oSQL, oConnectionId)
If oDatatable Is Nothing Then
_Logger.Warn("Error in SQL-Query '{0}'", oSQL)
Continue For
End If
oDataSearches.Add(New Search() With { oDataSearches.Add(New Search() With {
.DataTable = oDatatable, .DataTable = oDatatable,
.ProfileId = oProfileId, .ProfileId = oProfileId,

View File

@ -95,6 +95,10 @@ Public Class frmMatch
End If End If
End Sub End Sub
Private Sub frmMatch_Activated(sender As Object, e As EventArgs) Handles Me.Activated
TopMost = True
End Sub
Function CreateTiles() As Integer Function CreateTiles() As Integer
Try Try
Dim oCreatedTiles As Integer = 0 Dim oCreatedTiles As Integer = 0

View File

@ -123,6 +123,16 @@ Public Class frmDataResultList
_ActiveRowHandle = e.FocusedRowHandle _ActiveRowHandle = e.FocusedRowHandle
End Sub End Sub
Private Sub GridControl_Enter(sender As GridControl, e As EventArgs) Handles GridControl1.Enter, GridControl2.Enter, GridControl3.Enter
_ActiveGrid = sender
SetActiveGridBand()
End Sub
Private Sub GridView1_FocusedRowChanged(sender As GridView, e As FocusedRowChangedEventArgs) Handles GridView1.FocusedRowChanged, GridView2.FocusedRowChanged, GridView3.FocusedRowChanged
Dim oGrid As GridControl = sender.GridControl
_ActiveGrid = oGrid
End Sub
Private Sub SplitContainerControl1_SplitterPositionChanged(sender As Object, e As EventArgs) Handles SplitContainerControl1.SplitterPositionChanged Private Sub SplitContainerControl1_SplitterPositionChanged(sender As Object, e As EventArgs) Handles SplitContainerControl1.SplitterPositionChanged
If _IsLoading = False Then If _IsLoading = False Then
_Config.Config.SplitContainer1Distance = SplitContainerControl1.SplitterPosition _Config.Config.SplitContainer1Distance = SplitContainerControl1.SplitterPosition

View File

@ -223,7 +223,7 @@ Partial Class frmDocumentResultList
' '
Me.ContextMenuGrid.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DateiÖffnenToolStripMenuItem, Me.OrdnerÖffnenToolStripMenuItem, Me.PfadInZwischenablageKopierenToolStripMenuItem}) Me.ContextMenuGrid.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DateiÖffnenToolStripMenuItem, Me.OrdnerÖffnenToolStripMenuItem, Me.PfadInZwischenablageKopierenToolStripMenuItem})
Me.ContextMenuGrid.Name = "ContextMenuGrid" Me.ContextMenuGrid.Name = "ContextMenuGrid"
Me.ContextMenuGrid.Size = New System.Drawing.Size(200, 92) Me.ContextMenuGrid.Size = New System.Drawing.Size(200, 70)
' '
'DateiÖffnenToolStripMenuItem 'DateiÖffnenToolStripMenuItem
' '

View File

@ -102,13 +102,21 @@ Public Class frmDocumentResultList
UpdateGridHeader(index, oResult.Datatable.Rows.Count) UpdateGridHeader(index, oResult.Datatable.Rows.Count)
Case Else Case Else
MessageBox.Show("You have more than three searches configured. This Window will only show the first three result lists!") MessageBox.Show("You have more than three searches configured. This Window will only show the first three result lists!", Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Exit For Exit For
End Select End Select
Next Next
' Hide Grids depending on Result count ' Hide Grids depending on Result count
Select Case _ResultLists.Count Select Case _ResultLists.Count
Case 0
SplitContainerControl1.SetPanelCollapsed(True)
SplitContainerControl2.SetPanelCollapsed(True)
SwitchMainContainerHorizontal.Enabled = False
SwitchDetailContainerHorizontal.Enabled = False
MessageBox.Show("No Searches found.", Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Case 1 Case 1
SplitContainerControl1.SetPanelCollapsed(True) SplitContainerControl1.SetPanelCollapsed(True)
SplitContainerControl2.SetPanelCollapsed(True) SplitContainerControl2.SetPanelCollapsed(True)
@ -387,6 +395,11 @@ Public Class frmDocumentResultList
SetActiveGridBand() SetActiveGridBand()
End Sub End Sub
Private Sub GridView1_FocusedRowChanged(sender As GridView, e As FocusedRowChangedEventArgs) Handles GridView1.FocusedRowChanged, GridView2.FocusedRowChanged, GridView3.FocusedRowChanged
Dim oGrid As GridControl = sender.GridControl
_ActiveGrid = oGrid
End Sub
Private Sub SetActiveGridBand() Private Sub SetActiveGridBand()
If _ActiveGrid.Equals(GridControl1) Then If _ActiveGrid.Equals(GridControl1) Then
_ActiveGridBand = GridBand1 _ActiveGridBand = GridBand1
@ -496,4 +509,6 @@ Public Class frmDocumentResultList
Private Sub GridControl_DoubleClick(sender As Object, e As EventArgs) Handles GridControl1.DoubleClick, GridControl2.DoubleClick, GridControl3.DoubleClick Private Sub GridControl_DoubleClick(sender As Object, e As EventArgs) Handles GridControl1.DoubleClick, GridControl2.DoubleClick, GridControl3.DoubleClick
OpenFile() OpenFile()
End Sub End Sub
End Class End Class