fix upcased extensions not being recognized

This commit is contained in:
Jonathan Jenne 2020-02-12 15:51:56 +01:00
parent 299c092c5f
commit efd2d79df6
3 changed files with 8 additions and 9 deletions

View File

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

View File

@ -63,9 +63,8 @@
<Reference Include="GdPicture.NET.14"> <Reference Include="GdPicture.NET.14">
<HintPath>D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET (.NET Framework 4.5)\GdPicture.NET.14.dll</HintPath> <HintPath>D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET (.NET Framework 4.5)\GdPicture.NET.14.dll</HintPath>
</Reference> </Reference>
<Reference Include="Independentsoft.Msg, Version=2.0.570.21482, Culture=neutral, PublicKeyToken=76be97fe952f1ec7, processorArchitecture=MSIL"> <Reference Include="Independentsoft.Msg.2.0.570.21482">
<SpecificVersion>False</SpecificVersion> <HintPath>P:\Visual Studio Projekte\Bibliotheken\MSG .NET\Bin\Independentsoft.Msg.2.0.570.21482.dll</HintPath>
<HintPath>P:\Visual Studio Projekte\Bibliotheken\MSG .NET\Bin\14_11_19_MIME_UTF_ENCODING\Independentsoft.Msg.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">

View File

@ -50,9 +50,8 @@
<Reference Include="GdPicture.NET.14"> <Reference Include="GdPicture.NET.14">
<HintPath>D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET (.NET Framework 4.5)\GdPicture.NET.14.dll</HintPath> <HintPath>D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET (.NET Framework 4.5)\GdPicture.NET.14.dll</HintPath>
</Reference> </Reference>
<Reference Include="Independentsoft.Msg, Version=2.0.570.21482, Culture=neutral, PublicKeyToken=76be97fe952f1ec7, processorArchitecture=MSIL"> <Reference Include="Independentsoft.Msg.2.0.570.21482">
<SpecificVersion>False</SpecificVersion> <HintPath>P:\Visual Studio Projekte\Bibliotheken\MSG .NET\Bin\Independentsoft.Msg.2.0.570.21482.dll</HintPath>
<HintPath>P:\Visual Studio Projekte\Bibliotheken\MSG .NET\Bin\14_11_19_MIME_UTF_ENCODING\Independentsoft.Msg.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">