EDMIBenchmark: Use documentresultlist for listing files

This commit is contained in:
Jonathan Jenne 2021-01-06 16:58:38 +01:00
parent d4436010b3
commit 0b95b76f80
2 changed files with 33 additions and 6 deletions

View File

@ -5,6 +5,7 @@ Imports DevExpress.XtraEditors
Imports DevExpress.XtraEditors.Controls
Imports System.IO
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
Imports DigitalData.GUIs.Common
Public Class Form1
Private _LogConfig As LogConfig
@ -120,7 +121,7 @@ Public Class Form1
End Function
Private Async Sub ButtonLoadFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles ButtonLoadFile.ItemClick
Private Sub ButtonLoadFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles ButtonLoadFile.ItemClick
Try
Dim oSWTotal As New Stopwatch()
oSWTotal.Start()
@ -130,7 +131,7 @@ Public Class Form1
End If
Dim oObjectId As Integer = TextboxObjectId.EditValue
Dim oResponse As Client.DocumentInfo = Await _Client.GetDocumentInfo(2, oObjectId)
Dim oResponse As Client.DocumentInfo = _Client.GetDocumentInfo(2, oObjectId)
DocumentViewer1.LoadFile(oResponse.FullPath)
@ -146,10 +147,28 @@ Public Class Form1
Private Async Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
Try
Dim oResult As Client.FileList = Await _Client.ListFilesForUserAsync()
BindingSource1.DataSource = oResult.Datatable
Dim oParams As New DocumentResultParams() With {
.Results = New List(Of DocumentResult) From {
New DocumentResult() With {.Title = "lol", .Datatable = oResult.Datatable}
},
.WindowGuid = "1",
.ColumnNames = New ColumnNames() With {
.FilenameColumn = "FILENAME_EXT",
.FullPathColumn = "FULL_PATH",
.ObjectIdColumn = "IDB_OBJ_ID"
}
}
Dim oEnv As New DigitalData.Modules.ZooFlow.Environment() With {
.Service = New DigitalData.Modules.ZooFlow.State.ServiceState() With {
.IsActive = True,
.Address = "172.24.12.39:9000"
},
.Settings = New DigitalData.Modules.ZooFlow.State.SettingsState With {
.GdPictureKey = "21182889975216572111813147150675976632"
}
}
Dim oForm As New frmDocumentResultList(_LogConfig, oEnv, oParams)
oForm.Show()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Uh oh!")
End Try

View File

@ -156,6 +156,10 @@
<Project>{0958cddf-4a16-41f6-8837-8335f71d599c}</Project>
<Name>DocumentViewer</Name>
</ProjectReference>
<ProjectReference Include="..\GUIs.Common\Common.vbproj">
<Project>{d20a6bf2-c7c6-4a7a-b34d-fa27d775a049}</Project>
<Name>Common</Name>
</ProjectReference>
<ProjectReference Include="..\Modules.EDMIAPI\EDMI.API.vbproj">
<Project>{25017513-0d97-49d3-98d7-ba76d9b251b0}</Project>
<Name>EDMI.API</Name>
@ -164,6 +168,10 @@
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
<Name>Logging</Name>
</ProjectReference>
<ProjectReference Include="..\Modules.ZooFlow\ZooFlow.vbproj">
<Project>{81cac44f-3711-4c8f-ae98-e02a7448782a}</Project>
<Name>ZooFlow</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>