MS Logging
This commit is contained in:
parent
e5631f0800
commit
0fe82815b8
@ -489,6 +489,7 @@ Public Class DocumentViewer
|
||||
End Sub
|
||||
Private Function DoLoadFile(FilePath As String) As Boolean
|
||||
Try
|
||||
_logger.Debug($"DoLoadFile - Try loading file: {FilePath}")
|
||||
Dim oFileInfo = New FileInfo(FilePath)
|
||||
Dim oExtension As String = oFileInfo.Extension.ToUpper
|
||||
|
||||
@ -499,7 +500,7 @@ Public Class DocumentViewer
|
||||
|
||||
SpreadsheetControl1.Visible = False
|
||||
SpreadsheetControl1.Dock = DockStyle.None
|
||||
|
||||
_logger.Debug($"DoLoadFile - oExtension: {oExtension}")
|
||||
Select Case oExtension.ToUpper
|
||||
Case ".MSG"
|
||||
Dim oEmlPath As String = _email.Convert_ToEml(FilePath)
|
||||
@ -523,12 +524,13 @@ Public Class DocumentViewer
|
||||
SpreadsheetControl1.Dock = DockStyle.Fill
|
||||
|
||||
Case Else
|
||||
_logger.Debug($"DoLoadFile - Else-Teil - GDViewer will be used...")
|
||||
GdViewer.ZoomMode = ViewerZoomMode.ZoomModeWidthViewer
|
||||
GdViewer.DocumentAlignment = ViewerDocumentAlignment.DocumentAlignmentTopCenter
|
||||
GdViewer.ForceTemporaryMode = True
|
||||
GdViewer.AnnotationDropShadow = True
|
||||
|
||||
If GdViewer.DisplayFromFile(FilePath) <> GdPictureStatus.OK Then
|
||||
Dim oGDPictureStatus As GdPictureStatus = GdViewer.DisplayFromFile(FilePath)
|
||||
If oGDPictureStatus <> GdPictureStatus.OK Then
|
||||
Dim oFileName = IO.Path.GetFileName(FilePath)
|
||||
lbFileNotLoaded.Text = String.Format("Datei konnte nicht geladen werden:{0}{1}", vbCrLf, oFileName)
|
||||
lbFileNotLoaded.Visible = True
|
||||
@ -540,6 +542,7 @@ Public Class DocumentViewer
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
_logger.Warn($"Unexpected Error in DoLoadFile - ErrorMessage: {ex.Message}")
|
||||
_logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.9.6.0")>
|
||||
<Assembly: AssemblyFileVersion("1.9.6.0")>
|
||||
<Assembly: AssemblyVersion("1.9.8.0")>
|
||||
<Assembly: AssemblyFileVersion("1.9.8.0")>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user