ClipboardWatcher: fix frmMatch

This commit is contained in:
Jonathan Jenne 2020-12-23 15:47:38 +01:00
parent a846da8b58
commit 88e278a3ad
2 changed files with 25 additions and 20 deletions

View File

@ -29,7 +29,7 @@ Public Class ProfileSearches
Try
If _Environment.Service.IsActive = True Then
Try
Dim oSplit() As String = _Environment.Service.Address.Split(";")
Dim oSplit() As String = _Environment.Service.Address.Split(":")
Dim oAppServerAddress As String = oSplit(0)
Dim oAppServerPort As Integer = 9000
If oSplit.Length = 2 Then

View File

@ -228,30 +228,35 @@ Public Class frmMatch
End Sub
Private Async Sub TileControlMatch_ItemClick(sender As Object, e As TileItemEventArgs) Handles TileControlMatch.ItemClick
Dim oItem As TileItem = e.Item
Dim oProfileId As Integer = oItem.Tag
Try
Dim oItem As TileItem = e.Item
Dim oProfileId As Integer = oItem.Tag
Dim oProfileSearch As New ProfileSearches(_LogConfig, _Environment, _Params)
Dim oProfile As ProfileData = _Params.MatchingProfiles.
Where(Function(p) p.Guid = oProfileId).
ToList().
First()
Dim oProfileSearch As New ProfileSearches(_LogConfig, _Environment, _Params)
Dim oProfile As ProfileData = _Params.MatchingProfiles.
Where(Function(p) p.Guid = oProfileId).
ToList().
First()
Select Case oItem.Group.Name
Case TileGroupData.Name
Dim oSearches = Await oProfileSearch.LoadDataSearchesAsync(oProfileId)
OpenDataResults(oProfile, oSearches)
Select Case oItem.Group.Name
Case TileGroupData.Name
Dim oSearches = Await oProfileSearch.LoadDataSearchesAsync(oProfileId)
OpenDataResults(oProfile, oSearches)
Case TileGroupDocuments.Name
Dim oSearches = Await oProfileSearch.LoadDocumentSearchesAsync(oProfileId)
OpenDocumentResults(oProfile, oSearches)
Case TileGroupDocuments.Name
Dim oSearches = Await oProfileSearch.LoadDocumentSearchesAsync(oProfileId)
OpenDocumentResults(oProfile, oSearches)
Case Else
' TODO: Load combined results
'OpenResultForms(oProfileId, ProfileType.ANY)
End Select
Case Else
' TODO: Load combined results
'OpenResultForms(oProfileId, ProfileType.ANY)
End Select
Hide()
Hide()
Catch ex As Exception
MsgBox($"Error while loading Searches: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, Text)
_Logger.Error(ex)
End Try
End Sub
Private Sub OpenDocumentResults(Profile As ProfileData, Searches As List(Of ProfileSearches.Search))