From 811613cdeab07b7ace40c9ec8cd270c9e3b261c2 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Tue, 29 Oct 2019 13:03:27 +0100 Subject: [PATCH] top most for frmMatch, fix export for dataresultlist --- GUIs.ClipboardWatcher/ProfileSearches.vb | 12 ++++++++++++ GUIs.ClipboardWatcher/frmMatch.vb | 4 ++++ GUIs.Common/DataResultList/frmDataResultList.vb | 10 ++++++++++ .../frmDocumentResultList.Designer.vb | 2 +- .../DocumentResultList/frmDocumentResultList.vb | 17 ++++++++++++++++- 5 files changed, 43 insertions(+), 2 deletions(-) diff --git a/GUIs.ClipboardWatcher/ProfileSearches.vb b/GUIs.ClipboardWatcher/ProfileSearches.vb index f432ca90..1533e402 100644 --- a/GUIs.ClipboardWatcher/ProfileSearches.vb +++ b/GUIs.ClipboardWatcher/ProfileSearches.vb @@ -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, diff --git a/GUIs.ClipboardWatcher/frmMatch.vb b/GUIs.ClipboardWatcher/frmMatch.vb index ea5a59b9..19721e1f 100644 --- a/GUIs.ClipboardWatcher/frmMatch.vb +++ b/GUIs.ClipboardWatcher/frmMatch.vb @@ -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 diff --git a/GUIs.Common/DataResultList/frmDataResultList.vb b/GUIs.Common/DataResultList/frmDataResultList.vb index 97984a3c..30024376 100644 --- a/GUIs.Common/DataResultList/frmDataResultList.vb +++ b/GUIs.Common/DataResultList/frmDataResultList.vb @@ -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 diff --git a/GUIs.Common/DocumentResultList/frmDocumentResultList.Designer.vb b/GUIs.Common/DocumentResultList/frmDocumentResultList.Designer.vb index 3c413213..0e20ed95 100644 --- a/GUIs.Common/DocumentResultList/frmDocumentResultList.Designer.vb +++ b/GUIs.Common/DocumentResultList/frmDocumentResultList.Designer.vb @@ -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 ' diff --git a/GUIs.Common/DocumentResultList/frmDocumentResultList.vb b/GUIs.Common/DocumentResultList/frmDocumentResultList.vb index 0612417f..af2a5995 100644 --- a/GUIs.Common/DocumentResultList/frmDocumentResultList.vb +++ b/GUIs.Common/DocumentResultList/frmDocumentResultList.vb @@ -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 \ No newline at end of file