From efd2d79df619737cbad0cce25447713d89aa5a68 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 12 Feb 2020 15:51:56 +0100 Subject: [PATCH] fix upcased extensions not being recognized --- Controls.DocumentViewer/DocumentViewer.vb | 7 ++++--- Controls.DocumentViewer/DocumentViewer.vbproj | 5 ++--- .../GUIs.Test.DocumentViewerTest.vbproj | 5 ++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Controls.DocumentViewer/DocumentViewer.vb b/Controls.DocumentViewer/DocumentViewer.vb index 8f6c60a2..491ca9cd 100644 --- a/Controls.DocumentViewer/DocumentViewer.vb +++ b/Controls.DocumentViewer/DocumentViewer.vb @@ -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 diff --git a/Controls.DocumentViewer/DocumentViewer.vbproj b/Controls.DocumentViewer/DocumentViewer.vbproj index 8a016afd..92b11fe5 100644 --- a/Controls.DocumentViewer/DocumentViewer.vbproj +++ b/Controls.DocumentViewer/DocumentViewer.vbproj @@ -63,9 +63,8 @@ D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET (.NET Framework 4.5)\GdPicture.NET.14.dll - - False - P:\Visual Studio Projekte\Bibliotheken\MSG .NET\Bin\14_11_19_MIME_UTF_ENCODING\Independentsoft.Msg.dll + + P:\Visual Studio Projekte\Bibliotheken\MSG .NET\Bin\Independentsoft.Msg.2.0.570.21482.dll diff --git a/GUIs.Test.DocumentViewerTest/GUIs.Test.DocumentViewerTest.vbproj b/GUIs.Test.DocumentViewerTest/GUIs.Test.DocumentViewerTest.vbproj index 3da771df..700af33c 100644 --- a/GUIs.Test.DocumentViewerTest/GUIs.Test.DocumentViewerTest.vbproj +++ b/GUIs.Test.DocumentViewerTest/GUIs.Test.DocumentViewerTest.vbproj @@ -50,9 +50,8 @@ D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET (.NET Framework 4.5)\GdPicture.NET.14.dll - - False - P:\Visual Studio Projekte\Bibliotheken\MSG .NET\Bin\14_11_19_MIME_UTF_ENCODING\Independentsoft.Msg.dll + + P:\Visual Studio Projekte\Bibliotheken\MSG .NET\Bin\Independentsoft.Msg.2.0.570.21482.dll