Bart Reedijk преди 10 години
родител
ревизия
cfa4bd297b
променени са 2 файла, в които са добавени 2 реда и са изтрити 4 реда
  1. 1 1
      Proftaak Remote Healthcare/Fietsclient/Fietsclient.csproj
  2. 1 3
      Proftaak Remote Healthcare/Fietsclient/KettlerBikeComm.cs

+ 1 - 1
Proftaak Remote Healthcare/Fietsclient/Fietsclient.csproj

@@ -5,7 +5,7 @@
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
     <ProjectGuid>{49668592-ED5D-4907-9EA7-2DF70AB96271}</ProjectGuid>
-    <OutputType>Exe</OutputType>
+    <OutputType>WinExe</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>Fietsclient</RootNamespace>
     <AssemblyName>Fietsclient</AssemblyName>

+ 1 - 3
Proftaak Remote Healthcare/Fietsclient/KettlerBikeComm.cs

@@ -79,13 +79,11 @@ namespace Fietsclient
             catch (UnauthorizedAccessException)
             {
                 OnIncomingDebugLineEvent("ERROR: UnauthorizedAccessException throwed");
+                try { ComPort.Close(); } catch (Exception) { } // probeer om de ComPort wel te sluiten.
             }
             catch (InvalidOperationException)
             {
                 OnIncomingDebugLineEvent("ERROR: InvalidOperationException throwed");
-            }
-            finally
-            {
                 try { ComPort.Close(); } catch (Exception) { } // probeer om de ComPort wel te sluiten.
             }