DocumentViewer: Use global fileinfo
This commit is contained in:
parent
95173cdf15
commit
d2102f07e2
@ -30,7 +30,7 @@ Public Class DocumentViewer
|
|||||||
|
|
||||||
Private _hide_file_info_from_user As Boolean = False
|
Private _hide_file_info_from_user As Boolean = False
|
||||||
Private _FilePath As String
|
Private _FilePath As String
|
||||||
|
Private _Fileinfo As FileInfo
|
||||||
|
|
||||||
' List of all created temp files when converting msg files
|
' List of all created temp files when converting msg files
|
||||||
Private _TempFiles As New List(Of String)
|
Private _TempFiles As New List(Of String)
|
||||||
@ -80,6 +80,7 @@ Public Class DocumentViewer
|
|||||||
|
|
||||||
Dim oFileLoaded = DoLoadFile(FilePath)
|
Dim oFileLoaded = DoLoadFile(FilePath)
|
||||||
_FilePath = FilePath
|
_FilePath = FilePath
|
||||||
|
_Fileinfo = New FileInfo(FilePath)
|
||||||
|
|
||||||
If oFileLoaded = True Then
|
If oFileLoaded = True Then
|
||||||
FileLoaded = True
|
FileLoaded = True
|
||||||
@ -129,8 +130,7 @@ Public Class DocumentViewer
|
|||||||
If Len(_FilePath) Then
|
If Len(_FilePath) Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Dim oFileInfo = New IO.FileInfo(_FilePath)
|
Dim oExtension As String = _Fileinfo.Extension.ToUpper
|
||||||
Dim oExtension As String = oFileInfo.Extension.ToUpper
|
|
||||||
Select Case oExtension.ToUpper
|
Select Case oExtension.ToUpper
|
||||||
Case ".MSG"
|
Case ".MSG"
|
||||||
RichEditControl1.CreateNewDocument()
|
RichEditControl1.CreateNewDocument()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user