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