MS anpassungen

This commit is contained in:
2022-02-15 17:28:32 +01:00
parent c2b81af556
commit 5f69002668
20 changed files with 707 additions and 484 deletions

View File

@@ -11,7 +11,9 @@ 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
Public Class frmFlowForm
#Region "Sidebar DllImport"
@@ -163,6 +165,7 @@ Public Class frmFlowForm
Private ClassWindow As Window
Private ProfileFilter As ProfileFilter
Private ProfileLoader As ClassProfileLoader
Private _Environment As Environment
' Runtime Flags
Private ApplicationLoading As Boolean = True
@@ -186,9 +189,13 @@ Public Class frmFlowForm
Init = New ClassInit(My.LogConfig, Me)
AddHandler Init.Completed, AddressOf Init_Completed
Init.InitializeApplication()
_Environment = My.Application.GetEnvironment
' === Register Sidebar ===
RegisterBar(ABEdge.ABE_RIGHT)
End Sub
Private Sub frmFlowForm_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
@@ -303,8 +310,24 @@ Public Class frmFlowForm
End If
'oSQL = "SELECT * FROM TBIDB_ATTRIBUTE"
My.Tables.DTIDB_ATTRIBUTE = My.Database.GetDatatable("TBIDB_ATTRIBUTE", "SELECT * FROM TBIDB_ATTRIBUTE", EDMI.API.Constants.DatabaseType.IDB)
If IsNothing(My.Tables.DTIDB_CATALOG_USER) Then
Exit Sub
End If
For Each oRow As DataRow In My.Tables.DTIDB_CATALOG_USER.Rows
If oRow.Item("CAT_TITLE") = "QUICKSEARCH1_TITLE" Then
pnlQuicksearch1.Visible = True
lblQuicksearch1.Text = oRow.Item("CAT_STRING")
ElseIf oRow.Item("CAT_TITLE") = "QUICKSEARCH1_POS" Then
If oRow.Item("CAT_STRING") = "Top" Then
pnlQuicksearch1.Dock = DockStyle.Top
ElseIf oRow.Item("CAT_STRING") = "Bottom" Then
pnlQuicksearch1.Dock = DockStyle.Bottom
End If
End If
Next
Me.Cursor = Cursors.Default
End Sub
@@ -590,7 +613,7 @@ Public Class frmFlowForm
End If
'Erstmal alles löschen
My.Database.ExecuteNonQueryECM("DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')")
My.Database.ExecuteNonQueryECM("DELETE FROM TBGI_FILES_USER WHERE USER@WORK = '" & My.Application.User.UserName & "'")
If FileDrop.Drop_File(e) = True Then
TimerCheckDroppedFiles.Start()
@@ -613,7 +636,7 @@ Public Class frmFlowForm
End Sub
Private Async Function Globix_Check_Dropped_Files() As Threading.Tasks.Task
Try
Await My.Database.ExecuteNonQueryECMAsync($"DELETE FROM TBGI_FILES_USER WHERE WORKED = 1 AND UPPER(USER@WORK) = UPPER('{Environment.UserName}')")
Await My.Database.ExecuteNonQueryECMAsync($"DELETE FROM TBGI_FILES_USER WHERE WORKED = 1 AND USER@WORK = '{My.Application.User.UserName}'")
Dim i As Integer
For Each pFile As String In FileDrop.files_dropped
@@ -628,7 +651,7 @@ Public Class frmFlowForm
End If
Next
Dim sql As String = "SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')"
Dim sql As String = "SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND USER@WORK = '" & My.Application.User.UserName & "'"
My.Application.Globix.DTACTUAL_FILES = Nothing
My.Application.Globix.DTACTUAL_FILES = Await My.Database.GetDatatableECMAsync(sql)
My.Application.Globix.ABORT_INDEXING = False
@@ -816,7 +839,7 @@ Public Class frmFlowForm
If My.Application.Globix.Folderwatchstarted = True Or My.UIConfig.Globix.FolderWatchScanStarted = True Then
'Prüfen ob alle Files abgearbeitet wurden
Dim sql = "SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND HANDLE_TYPE like '%|FW%' AND UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')"
Dim sql = "SELECT * FROM TBGI_FILES_USER WHERE WORKED = 0 AND HANDLE_TYPE like '%|FW%' AND USER@WORK = '" & My.Application.User.UserName & "'"
My.Application.Globix.DTACTUAL_FILES = My.Database.GetDatatableECM(sql)
If My.Application.Globix.DTACTUAL_FILES.Rows.Count > 0 Then
@@ -929,7 +952,7 @@ Public Class frmFlowForm
oState.UserProfiles, oState.ProfileProcesses, oState.ProfileWindows, oState.ProfileControls, oState.MatchTreeView)
Catch ex As Exception
Logger.Error(ex)
MsgBox("Fehler beim Laden der Profile. Möglicherweise liegt ein Konfigurationsfehler vor. Fehlermeldung: " & ex.Message, MsgBoxStyle.Critical, Text)
End Try
Try
@@ -1033,22 +1056,85 @@ Public Class frmFlowForm
End Sub
Private Sub SucheTestToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SucheTestToolStripMenuItem.Click
frmSearchNeu.Show()
End Sub
Private Sub BasisKonfigurationToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BasisKonfigurationToolStripMenuItem.Click
frmConfigBasic.ShowDialog()
End Sub
Private Sub TestFlowSearchToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TestFlowSearchToolStripMenuItem.Click
Open_FlowSearch()
End Sub
Private Sub ShowErrorMessage(pEx As Exception)
Dim oCallingClass = LogConfig.GetClassFullName(IncludeMethodNames:=True, Parts:=2)
ErrorHandler.ShowErrorMessage(pEx, oCallingClass)
End Sub
Private Function GetResultWindowString(SearchContent As String) As String
If SearchContent <> String.Empty Then
If My.Application.User.Language = DigitalData.Modules.ZooFlow.State.UserState.LANG_DE_DE Then
Return $"Suche Nach '{SearchContent}'"
Else
Return $"Search For '{SearchContent}'"
End If
End If
End Function
Sub RunQuickSearch1()
Try
Dim oSQL = $"EXEC PRIDB_SEARCH_TEXT_GET_RESULTS {My.Application.User.UserId},'{TextEdit1.Text}',''"
Dim oParams = New DocumentResultList.Params() With {
.WindowGuid = "QuickFlowSearch1",
.WindowTitle = GetResultWindowString(TextEdit1.Text),
.OperationModeOverride = Modules.ZooFlow.Constants.OperationMode.ZooFlow,
.ProfileGuid = 354521
}
If My.DatabaseIDB.ExecuteNonQuery(oSQL) = True Then
Dim oDTDocResult = My.DatabaseIDB.GetDatatable(DocResultBaseSearch)
If oDTDocResult.Rows.Count > 0 Then
oParams.Results.Add(New DocumentResultList.DocumentResult() With {
.Title = GetResultWindowString(TextEdit1.Text),
.Datatable = oDTDocResult})
Dim oForm As New frmDocumentResultList(My.LogConfig, _Environment, oParams)
'AddHandler oForm.FormClosed, AddressOf ProfileResultForm_Closed
'AddHandler oForm.NeedsRefresh, AddressOf ProfileResultForm_NeedsRefresh
'OpenForms.Add(oForm)
oForm.Show()
Else
MsgBox("No Results")
End If
End If
Catch ex As Exception
Logger.Error(ex)
MsgBox("Unhandled exception in RunQuickSearch1: " & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub TextEdit1_KeyUp(sender As Object, e As KeyEventArgs) Handles TextEdit1.KeyUp
If e.KeyCode = Keys.Return Then
CheckRunSearch1()
End If
End Sub
Sub CheckRunSearch1()
If TextEdit1.Text <> String.Empty Then
RunQuickSearch1()
End If
End Sub
Private Sub PictureEdit1_Click(sender As Object, e As EventArgs) Handles PictureEdit1.Click
CheckRunSearch1()
End Sub
Private Sub frmFlowForm_Shown(sender As Object, e As EventArgs) Handles Me.Shown
End Sub
End Class