fix upcased extensions not being recognized
This commit is contained in:
@@ -85,6 +85,7 @@ Public Class DocumentViewer
|
||||
GdViewer.DocumentAlignment = ViewerDocumentAlignment.DocumentAlignmentTopCenter
|
||||
|
||||
_logger.Info("Loading File {0}", filepath)
|
||||
|
||||
DoLoadFile(filepath)
|
||||
|
||||
If _view_only Then
|
||||
@@ -113,10 +114,10 @@ Public Class DocumentViewer
|
||||
Private Sub DoLoadFile(FilePath As String)
|
||||
Try
|
||||
Dim oFileInfo = New IO.FileInfo(FilePath)
|
||||
Dim oExtension As String = oFileInfo.Extension
|
||||
Dim oExtension As String = oFileInfo.Extension.ToUpper
|
||||
|
||||
Select Case oExtension
|
||||
Case ".msg"
|
||||
Case ".MSG"
|
||||
Dim oMsg As New Independentsoft.Msg.Message(FilePath)
|
||||
' TODO: Improve Encoding, maybe convert based on encoding
|
||||
oMsg.Encoding = System.Text.Encoding.UTF32
|
||||
@@ -130,7 +131,7 @@ Public Class DocumentViewer
|
||||
|
||||
RichEditControl1.Visible = True
|
||||
RichEditControl1.Dock = DockStyle.Fill
|
||||
Case ".eml"
|
||||
Case ".EML"
|
||||
RichEditControl1.LoadDocument(FilePath, DevExpress.XtraRichEdit.DocumentFormat.Mht)
|
||||
|
||||
RichEditControl1.Visible = True
|
||||
|
||||
Reference in New Issue
Block a user