Zooflow: Add recent files first draft, fix opening process manager

This commit is contained in:
Jonathan Jenne
2022-04-28 10:56:29 +02:00
parent d36be2c9da
commit e3ee11c6a6
9 changed files with 200 additions and 26 deletions

View File

@@ -20,6 +20,7 @@ Imports DevExpress.LookAndFeel
Imports System.Threading.Tasks
Imports System.Threading
Imports DigitalData.Controls.MessageBoxEx
Imports System.ComponentModel
Public Class frmFlowForm
#Region "Sidebar DllImport"
@@ -86,9 +87,7 @@ Public Class frmFlowForm
End If
MyBase.WndProc(m)
Catch ex As Exception
End Try
End Sub
Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams
Get
@@ -196,6 +195,7 @@ Public Class frmFlowForm
Public Event ClipboardChanged As EventHandler(Of IDataObject)
Private WithEvents HotkeyClass As Hotkey
Private WithEvents Watcher As Watcher = Watcher.Singleton
#End Region
Private Sub frmFlowForm_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -232,7 +232,6 @@ Public Class frmFlowForm
Environment = My.Application.GetEnvironment()
ErrorHandler = New BaseErrorHandler(My.LogConfig, Logger, Me)
Modules = New ClassModules(My.LogConfig, My.SystemConfig)
FileEx = New Filesystem.File(My.LogConfig)
' === Initialize Theming ===
If My.Application.Palette = "" Then
@@ -250,8 +249,6 @@ Public Class frmFlowForm
AddHandler KeyUp, AddressOf frmFlowForm_KeyDown
AddHandler Watcher.ClipboardChanged, AddressOf Watcher_ClipboardChanged
'Dim oSQL = My.Queries.Common.FNIDB_GET_SEARCH_PROFILES(My.Application.User.UserId, My.Application.User.Language)
'Dim oDatatable As DataTable = My.Database.GetDatatableIDB(oSQL)
PictureBoxSearch.Visible = False
For Each oRow As DataRow In My.Tables.DTIDB_COMMON_SQL.Rows
@@ -261,14 +258,12 @@ Public Class frmFlowForm
End If
Next
'If Not IsNothing(oDatatable) Then
' If oDatatable.Rows.Count > 0 Then
' IDBSearchActive = True
' DTIDB_SEARCHES = oDatatable
' PictureBoxSearch1.Visible = True
' End If
Dim oSql = $"SELECT TOP 10 * FROM VWIDB_DOCRESULT_DE WHERE [Changed who] = 'SchreiberM' ORDER BY [Changed when] DESC"
Dim AccessedFilesTable = Await My.Database.GetDatatableIDBAsync(oSql)
'End If
GridControl1.DataSource = AccessedFilesTable
colPrimary.FieldName = "DisplayFileName"
colSecondary.FieldName = "Changed when"
If My.Application.ModulesActive.Contains(MODULE_CLIPBOARDWATCHER) Then
Try
@@ -345,8 +340,6 @@ Public Class frmFlowForm
End If
If IsNothing(My.Tables.DTIDB_CATALOG_USER) Then
Exit Function
End If
@@ -1120,7 +1113,6 @@ Public Class frmFlowForm
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}'"
@@ -1246,7 +1238,7 @@ Public Class frmFlowForm
Private Sub PictureBoxPM_Click(sender As Object, e As EventArgs) Handles PictureBoxPM.Click
Try
Dim oProcessManagerPath = Modules.GetProductPath(DigitalData.Modules.Base.ECM.Product.ProcessManager)
Dim oProcessManagerPath = Modules.GetProductProgramPath(DigitalData.Modules.Base.ECM.Product.ProcessManager)
If oProcessManagerPath IsNot Nothing AndAlso IO.File.Exists(oProcessManagerPath) Then
Process.Start(oProcessManagerPath)
End If
@@ -1286,5 +1278,36 @@ Public Class frmFlowForm
Private Sub PictureEditQuicksearch1_EditValueChanged(sender As Object, e As EventArgs) Handles PictureEditQuicksearch1.EditValueChanged
End Sub
Private Sub AdvBandedGridView1_DoubleClick(sender As Object, e As EventArgs) Handles RecentFilesView.DoubleClick
If RecentFilesView.FocusedRowHandle >= 0 Then
Dim oFile As DataRowView = RecentFilesView.GetRow(RecentFilesView.FocusedRowHandle)
Dim oRow As DataRow = oFile.Row
Dim oObjectId As Long = oRow.Item("DocId")
Dim oDataSource As DataTable = GridControl1.DataSource
Dim oResult = oDataSource.AsEnumerable().
Where(Function(row) row.Item("DocId") = oObjectId).
CopyToDataTable()
Dim oParams = New DocumentResultList.Params() With {
.WindowGuid = "SingleDocument",
.WindowTitle = "Einzelnes Dokument",
.OperationModeOverride = DigitalData.Modules.ZooFlow.Constants.OperationMode.ZooFlow,
.ProfileGuid = 354521,
.ShowBackNavigation = False,
.ShowFileList = False,
.Results = New List(Of DocumentResultList.DocumentResult) From {
New DocumentResultList.DocumentResult() With {
.Title = "Einzelnes Dokument",
.Datatable = oResult
}
}
}
Dim oForm As New frmDocumentResultList(My.LogConfig, Environment, oParams)
oForm.Show()
End If
End Sub
End Class