diff --git a/Controls.DocumentViewer/DocumentViewer.vb b/Controls.DocumentViewer/DocumentViewer.vb index d635acc0..297d9903 100644 --- a/Controls.DocumentViewer/DocumentViewer.vb +++ b/Controls.DocumentViewer/DocumentViewer.vb @@ -103,7 +103,6 @@ Public Class DocumentViewer _docPath = FilePath GdViewer.DisplayFromFile(_docPath) - GdViewer.Focus() RichEditControl1.Visible = False RichEditControl1.Dock = DockStyle.None @@ -502,6 +501,7 @@ Public Class DocumentViewer Try IO.File.Delete(oFile) Catch ex As Exception + _logger.Warn("Could not delete temp file {0}", oFile) End Try Next End Sub diff --git a/GUIs.ClipboardWatcher/frmMatch.vb b/GUIs.ClipboardWatcher/frmMatch.vb index b28da9db..2a437508 100644 --- a/GUIs.ClipboardWatcher/frmMatch.vb +++ b/GUIs.ClipboardWatcher/frmMatch.vb @@ -62,7 +62,7 @@ Public Class frmMatch oForm.ShowDialog() End Sub - Private Sub frmMatch_Load(sender As Object, e As EventArgs) Handles MyBase.Load + Private Async Sub frmMatch_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim oCreatedTiles = CreateTiles() If oCreatedTiles = -1 Then @@ -79,7 +79,19 @@ Public Class frmMatch If oCreatedTiles = 1 Then Dim oProfile As ProfileData = _Params.MatchingProfiles.First() - ' TODO Open Result Forms + Dim oProfileSearch As New ProfileSearches(_LogConfig, _Environment, _Params) + + If oProfile.CountData > 0 Then + Dim oSearches = Await oProfileSearch.LoadDataSearchesAsync() + OpenDataResults(oProfile, oSearches) + Hide() + + ElseIf oProfile.CountDocs > 0 Then + Dim oSearches = Await oProfileSearch.LoadDocumentSearchesAsync() + OpenDocumentResults(oProfile, oSearches) + Hide() + + End If End If End Sub @@ -94,14 +106,15 @@ Public Class frmMatch oDataGroup.Items.Clear() For Each oProfile As ProfileData In _Params.MatchingProfiles - If oProfile.ProfileType = ProfileType.ANY Then - If oProfile.CountData > 0 And oProfile.CountDocs > 0 Then - Dim oCountText = oProfile.CountData + oProfile.CountDocs - Dim oItem = CreateTile(oProfile, $"{oCountText} Ergebnisse") - oDataDocumentsGroup.Items.Add(oItem) - oCreatedTiles += 1 - End If - End If + 'TODO: Add Support for Combined Result Lists + 'If oProfile.ProfileType = ProfileType.ANY Then + ' If oProfile.CountData > 0 And oProfile.CountDocs > 0 Then + ' Dim oCountText = oProfile.CountData + oProfile.CountDocs + ' Dim oItem = CreateTile(oProfile, $"{oCountText} Ergebnisse") + ' oDataDocumentsGroup.Items.Add(oItem) + ' oCreatedTiles += 1 + ' End If + 'End If If oProfile.ProfileType = ProfileType.ANY Or oProfile.ProfileType = ProfileType.DOCS_ONLY Then If oProfile.CountDocs > 0 Then