Common: Rework of DocumentResultList WIP

This commit is contained in:
Jonathan Jenne
2022-01-18 13:27:20 +01:00
parent febd89a3c0
commit f5ec035772
24 changed files with 486 additions and 477 deletions

View File

@@ -0,0 +1,51 @@
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.ZooFlow.Base
Namespace DocumentResultList
Public Class Opener
Inherits BaseClass
Public Sub New(pLogConfig As LogConfig)
MyBase.New(pLogConfig)
End Sub
Public Sub OpenDocument(pDocument As Document)
Dim oProcessId As Integer = Nothing
If pDocument.FullPath Is Nothing OrElse pDocument.FullPath.Trim = String.Empty Then
oProcessId = OpenFileFromPath(pDocument)
ElseIf pDocument.Extension IsNot Nothing AndAlso pDocument.Contents IsNot Nothing Then
End If
End Sub
Private Function OpenFileFromByteArry(pDocument As Document) As Integer
Try
' TODO: Open file from temp folder
Dim oTempPath = IO.Path.GetTempPath()
Catch ex As Exception
End Try
End Function
Private Function OpenFileFromPath(pDocument As Document) As Integer
Try
Dim oProcess = Process.Start(New ProcessStartInfo With {
.FileName = pDocument.FullPath
})
Return oProcess.Id
Catch ex As Exception
Logger.Error(ex)
Return Nothing
End Try
End Function
End Class
End Namespace