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)
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 {
.Guid = oGuid,
.DataTable = oDatatable,
@ -90,6 +96,12 @@ Public Class ProfileSearches
oSQL = oPatterns.ReplaceInternalValues(oSQL)
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 {
.DataTable = oDatatable,
.ProfileId = oProfileId,

View File

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

View File

@ -123,6 +123,16 @@ Public Class frmDataResultList
_ActiveRowHandle = e.FocusedRowHandle
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
If _IsLoading = False Then
_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.Name = "ContextMenuGrid"
Me.ContextMenuGrid.Size = New System.Drawing.Size(200, 92)
Me.ContextMenuGrid.Size = New System.Drawing.Size(200, 70)
'
'DateiÖffnenToolStripMenuItem
'

View File

@ -102,13 +102,21 @@ Public Class frmDocumentResultList
UpdateGridHeader(index, oResult.Datatable.Rows.Count)
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
End Select
Next
' Hide Grids depending on Result 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
SplitContainerControl1.SetPanelCollapsed(True)
SplitContainerControl2.SetPanelCollapsed(True)
@ -387,6 +395,11 @@ Public Class frmDocumentResultList
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 SetActiveGridBand()
If _ActiveGrid.Equals(GridControl1) Then
_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
OpenFile()
End Sub
End Class