clean up
This commit is contained in:
@@ -9,18 +9,15 @@ Imports DigitalData.GUIs.ZooFlow.ClipboardWatcher
|
||||
Imports DigitalData.Modules
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Language.Utils
|
||||
Imports DigitalData.Modules.Messaging
|
||||
Imports DigitalData.Modules.Windows
|
||||
Imports DigitalData.Modules.ZooFlow
|
||||
Imports DigitalData.GUIs.Common.Base
|
||||
Imports DigitalData.GUIs.Common
|
||||
Imports DigitalData.Controls.SQLConfig
|
||||
Imports DigitalData.Modules.Language
|
||||
Imports DevExpress.LookAndFeel
|
||||
Imports System.Threading.Tasks
|
||||
Imports System.Threading
|
||||
Imports DigitalData.Controls.MessageBoxEx
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class frmFlowForm
|
||||
#Region "Sidebar DllImport"
|
||||
@@ -262,7 +259,7 @@ Public Class frmFlowForm
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim oSql = $"SELECT TOP 10 * FROM VWIDB_DOCRESULT_DE WHERE [Changed who] = 'SchreiberM' ORDER BY [Changed when] DESC"
|
||||
Dim oSql = $"SELECT TOP 10 * FROM VWIDB_DOCRESULT_DE WHERE [Changed who] = '{My.Application.User.UserName}' ORDER BY [Changed when] DESC"
|
||||
Dim AccessedFilesTable = Await My.Database.GetDatatableIDBAsync(oSql)
|
||||
|
||||
GridControl1.DataSource = AccessedFilesTable
|
||||
@@ -303,7 +300,7 @@ Public Class frmFlowForm
|
||||
ProfileLoader = New ClassProfileLoader(My.LogConfig, My.Database)
|
||||
ProfileLoader.LoadProfiles()
|
||||
Catch ex As Exception
|
||||
ShowErrorMessage(ex)
|
||||
ErrorHandler.ShowErrorMessage(ex, "Init Search FLOW")
|
||||
End Try
|
||||
Else
|
||||
My.Application.ClipboardWatcher.MonitoringActive = False
|
||||
@@ -587,15 +584,6 @@ Public Class frmFlowForm
|
||||
Next
|
||||
|
||||
End Function
|
||||
Private Function FormLoaded_Visible() As Boolean
|
||||
For Each frm As Form In Application.OpenForms
|
||||
If frm.Name.Equals("frmSearchStart") Or frm.Name.Equals("frmGlobix_Index") Or frm.Name.Equals("frmAdmin_Start") Then
|
||||
Return False
|
||||
End If
|
||||
Next
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub NotifyIcon_DoubleClick(sender As Object, e As EventArgs) Handles NotifyIcon.DoubleClick
|
||||
If Visible = False Then
|
||||
@@ -605,10 +593,6 @@ Public Class frmFlowForm
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PictureBox1_DragEnter(sender As Object, e As DragEventArgs)
|
||||
Drag_Enter(sender, e)
|
||||
End Sub
|
||||
|
||||
Sub Drag_Enter(sender As Object, e As DragEventArgs)
|
||||
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
|
||||
e.Effect = DragDropEffects.All
|
||||
@@ -646,11 +630,7 @@ Public Class frmFlowForm
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Async Sub PictureBox1_DragDrop(sender As Object, e As DragEventArgs)
|
||||
Await DragDropForm(e)
|
||||
End Sub
|
||||
|
||||
Private Async Function Globix_CheckDroppedFiles(pDroppedFiles As List(Of FileDrop.DroppedFile)) As Threading.Tasks.Task
|
||||
Private Async Function Globix_CheckDroppedFiles(pDroppedFiles As List(Of FileDrop.DroppedFile)) As Task
|
||||
Try
|
||||
Await My.Database.ExecuteNonQueryECMAsync($"DELETE FROM TBGI_FILES_USER WHERE WORKED = 1 AND USER@WORK = '{My.Application.User.UserName}'")
|
||||
|
||||
@@ -853,7 +833,7 @@ Public Class frmFlowForm
|
||||
My.UIConfigManager.Save()
|
||||
End Sub
|
||||
|
||||
Private Sub TimerFolderwatch_Tick_1(sender As Object, e As EventArgs) Handles TimerFolderwatch.Tick
|
||||
Private Sub TimerFolderwatch_Tick(sender As Object, e As EventArgs) Handles TimerFolderwatch.Tick
|
||||
|
||||
Try
|
||||
' JenneJ, 11.02.2019:
|
||||
@@ -1126,71 +1106,12 @@ Public Class frmFlowForm
|
||||
End If
|
||||
End Function
|
||||
|
||||
Async Function GetSearchResults(pSearchText As String) As Task
|
||||
Dim oSQL = $"EXEC PRIDB_SEARCH_TEXT_GET_RESULTS {My.Application.User.UserId},'{pSearchText}',''"
|
||||
Await My.Database.GetDatatableIDBAsync(DocResultBaseSearch)
|
||||
End Function
|
||||
|
||||
Async Function RunQuickSearch1(pSearchText As String) As Threading.Tasks.Task
|
||||
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
|
||||
|
||||
Try
|
||||
Dim oSQL = $"EXEC PRIDB_SEARCH_TEXT_GET_RESULTS {My.Application.User.UserId},'{pSearchText}',''"
|
||||
Dim oParams = New DocumentResultList.Params() With {
|
||||
.WindowGuid = "QuickFlowSearch1",
|
||||
.WindowTitle = GetResultWindowString(pSearchText),
|
||||
.OperationModeOverride = DigitalData.Modules.ZooFlow.Constants.OperationMode.ZooFlow,
|
||||
.ProfileGuid = 354521,
|
||||
.ShowBackNavigation = False
|
||||
}
|
||||
|
||||
If Await My.Database.ExecuteNonQueryIDBAsync(oSQL) = True Then
|
||||
Dim oDTDocResult = Await My.Database.GetDatatableIDBAsync(DocResultBaseSearch)
|
||||
|
||||
If oDTDocResult.Rows.Count > 0 Then
|
||||
Logger.Debug($"Quicksearch1 got {oDTDocResult.Rows.Count} results")
|
||||
oParams.Results.Add(New DocumentResultList.DocumentResult() With {
|
||||
.Title = GetResultWindowString(pSearchText),
|
||||
.Datatable = oDTDocResult
|
||||
})
|
||||
|
||||
' disable file list if we have only one document
|
||||
If oDTDocResult.Rows.Count = 1 Then
|
||||
oParams.ShowFileList = False
|
||||
End If
|
||||
|
||||
Dim oForm As New frmDocumentResultList(My.LogConfig, Environment, oParams)
|
||||
oForm.Show()
|
||||
oForm.BringToFront()
|
||||
oForm.Focus()
|
||||
|
||||
Else
|
||||
Dim oMessage As String
|
||||
If My.Application.User.Language = "de-DE" Then
|
||||
oMessage = "Kein Ergebnis"
|
||||
Else
|
||||
oMessage = "No results"
|
||||
End If
|
||||
NotifyIcon.ShowBalloonTip(20000, $"Info", oMessage, ToolTipIcon.Info)
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox("Unhandled exception in RunQuickSearch1: " & ex.Message, MsgBoxStyle.Critical)
|
||||
Finally
|
||||
SplashScreenManager.CloseOverlayForm(oHandle)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Async Sub TextEdit1_KeyUp(sender As Object, e As KeyEventArgs) Handles txtQuicksearch1.KeyUp
|
||||
If e.KeyCode = Keys.Return Then
|
||||
Await CheckQuickSearch1()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Async Function CheckQuickSearch1() As Threading.Tasks.Task
|
||||
Dim oSearchText = txtQuicksearch1.Text
|
||||
|
||||
@@ -1201,7 +1122,7 @@ Public Class frmFlowForm
|
||||
Try
|
||||
Dim oResult = Await Search.Run(oSearchText)
|
||||
If oResult.OK = False Then
|
||||
NotifyIcon.ShowBalloonTip(5_000, "Info", oResult.ErrorMessage, ToolTipIcon.Info)
|
||||
NotifyIcon.ShowBalloonTip(20_000, "Info", oResult.ErrorMessage, ToolTipIcon.Info)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
Reference in New Issue
Block a user