Merge branch 'master' of http://dd-vmp07-com04:3000/AppStd/Monorepo
This commit is contained in:
commit
905a660e2b
@ -29,6 +29,7 @@ Public Class DocumentViewer
|
||||
Private _logger As Logger
|
||||
|
||||
Private _hide_file_info_from_user As Boolean = False
|
||||
Private _FilePath As String
|
||||
|
||||
' List of all created temp files when converting msg files
|
||||
Private _TempFiles As New List(Of String)
|
||||
@ -72,6 +73,7 @@ Public Class DocumentViewer
|
||||
''' </summary>
|
||||
Public Sub Done()
|
||||
DeleteTempFiles()
|
||||
FreeFile()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
@ -87,7 +89,7 @@ Public Class DocumentViewer
|
||||
_logger.Info("Loading File {0}", FilePath)
|
||||
|
||||
DoLoadFile(FilePath)
|
||||
|
||||
_FilePath = FilePath
|
||||
UpdateMainUi()
|
||||
End Sub
|
||||
|
||||
@ -121,7 +123,27 @@ Public Class DocumentViewer
|
||||
Next
|
||||
_TempFiles.Clear()
|
||||
End Sub
|
||||
Private Sub FreeFile()
|
||||
Try
|
||||
Dim oFileInfo = New IO.FileInfo(_FilePath)
|
||||
Dim oExtension As String = oFileInfo.Extension.ToUpper
|
||||
Select Case oExtension.ToUpper
|
||||
Case ".MSG"
|
||||
|
||||
RichEditControl1.CreateNewDocument()
|
||||
|
||||
|
||||
Case ".EML", ".DOC", ".DOCX", ".ODT", ".RTF", ".TXT"
|
||||
RichEditControl1.CreateNewDocument()
|
||||
Case ".XLSX", ".XLS", "CSV"
|
||||
SpreadsheetControl1.CreateNewDocument()
|
||||
Case Else
|
||||
GdViewer.CloseDocument()
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
_logger.Warn($"Unexpected error in FreeFile: {ex.Message}")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub DoLoadFile(FilePath As String)
|
||||
Try
|
||||
Dim oFileInfo = New IO.FileInfo(FilePath)
|
||||
|
||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.3.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyVersion("1.0.4.0")>
|
||||
<Assembly: AssemblyFileVersion("1.4.0.0")>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user