Replaced MessageBox, returned to sqlite Version 117

This commit is contained in:
Daniel Schick 2024-10-18 17:13:43 +02:00
parent 3da70ee1e1
commit e3882b6bfd
4 changed files with 48 additions and 23 deletions

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
(c) 2017-present Informatikbüro Daniel Schick (c) 2017-present Informatikbüro Daniel Schick
--> -->
@ -50,4 +50,24 @@
<endpoint address="http://localhost:11651/LockingService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService" contract="LockingServiceReference.IService" name="BasicHttpBinding_IService" /> <endpoint address="http://localhost:11651/LockingService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService" contract="LockingServiceReference.IService" name="BasicHttpBinding_IService" />
</client> </client>
</system.serviceModel> </system.serviceModel>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.2" newVersion="8.0.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.2" newVersion="8.0.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> </configuration>

View File

@ -6,6 +6,8 @@ using System.Windows;
using System.Windows.Markup; using System.Windows.Markup;
using bsmd.database; using bsmd.database;
using log4net;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
using System; using System;
@ -14,13 +16,15 @@ using ENI2.LockingServiceReference;
using ENI2.Util; using ENI2.Util;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Office.Interop.Excel;
using System.Drawing.Drawing2D;
namespace ENI2 namespace ENI2
{ {
/// <summary> /// <summary>
/// Interaction logic for App.xaml /// Interaction logic for App.xaml
/// </summary> /// </summary>
public partial class App : Application public partial class App : System.Windows.Application
{ {
// "global" statics, da gibt es sicher noch einen eleganteren Weg.. // "global" statics, da gibt es sicher noch einen eleganteren Weg..
private static ServiceClient _lockingServiceClient = null; private static ServiceClient _lockingServiceClient = null;
@ -31,6 +35,8 @@ namespace ENI2
private ManualResetEvent ResetSplashCreated; private ManualResetEvent ResetSplashCreated;
private Thread _splashThread; private Thread _splashThread;
private ILog _log = LogManager.GetLogger(typeof(App).Name);
public App() : base() public App() : base()
{ {
this.Dispatcher.UnhandledException += Dispatcher_UnhandledException; this.Dispatcher.UnhandledException += Dispatcher_UnhandledException;
@ -69,12 +75,10 @@ namespace ENI2
// initialize static / localized lookups from sqlite database // initialize static / localized lookups from sqlite database
string langKey = CultureInfo.CurrentCulture.TwoLetterISOLanguageName; string langKey = CultureInfo.CurrentCulture.TwoLetterISOLanguageName;
Dictionary<int, string> cargoHandlingDict = LocalizedLookup.getLADGCargoHandlingStrings(langKey); Dictionary<int, string> cargoHandlingDict = LocalizedLookup.getLADGCargoHandlingStrings(langKey);
foreach (int key in cargoHandlingDict.Keys) foreach (int key in cargoHandlingDict.Keys)
LADG.CargoHandlingDict.Add(key, cargoHandlingDict[key]); LADG.CargoHandlingDict.Add(key, cargoHandlingDict[key]);
LADG.MVSHLocodes.AddRange(LocalizedLookup.getMVSHLocodes()); LADG.MVSHLocodes.AddRange(LocalizedLookup.getMVSHLocodes());
EventManager.RegisterClassHandler(typeof(DatePicker), DatePicker.PreviewKeyDownEvent, new KeyEventHandler(this.DatePicker_PreviewKeyDown)); EventManager.RegisterClassHandler(typeof(DatePicker), DatePicker.PreviewKeyDownEvent, new KeyEventHandler(this.DatePicker_PreviewKeyDown));
CREW.NationalityDict = LocalizedLookup.getNationalities(); CREW.NationalityDict = LocalizedLookup.getNationalities();
STAT.VesselTypeDict = LocalizedLookup.getVesselTypes(); STAT.VesselTypeDict = LocalizedLookup.getVesselTypes();
@ -155,9 +159,9 @@ namespace ENI2
private void Dispatcher_UnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) private void Dispatcher_UnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
{ {
string errorMessage = string.Format("An unhandled exception occurred: {0}\r\n{1}", e.Exception.Message, e.Exception.StackTrace); string errorMessage = string.Format("An unhandled exception occurred: {0}\r\n{1}", e.Exception.Message, e.Exception.StackTrace);
MessageBox.Show(errorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error); Xceed.Wpf.Toolkit.MessageBox.Show(errorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
// TODO: Dieser Fehler muss irgendwohin gesendet / gespeichert werden
e.Handled = true; e.Handled = true;
_log.Error(errorMessage);
} }
private void DatePicker_PreviewKeyDown(object sender, KeyEventArgs e) private void DatePicker_PreviewKeyDown(object sender, KeyEventArgs e)

View File

@ -36,8 +36,8 @@
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion> <MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish> <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage> <WebPage>publish.html</WebPage>
<ApplicationRevision>3</ApplicationRevision> <ApplicationRevision>6</ApplicationRevision>
<ApplicationVersion>7.2.4.2</ApplicationVersion> <ApplicationVersion>7.2.4.6</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>
@ -62,7 +62,8 @@
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>0</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<StartupObject>ENI2.App</StartupObject> <StartupObject>ENI2.App</StartupObject>
@ -199,8 +200,8 @@
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Data.SQLite, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> <Reference Include="System.Data.SQLite, Version=1.0.117.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\lib\net46\System.Data.SQLite.dll</HintPath> <HintPath>packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.117.0\lib\net46\System.Data.SQLite.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath> <HintPath>packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
@ -982,9 +983,9 @@
<Resource Include="Resources\containership.ico" /> <Resource Include="Resources\containership.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2"> <BootstrapperPackage Include=".NETFramework,Version=v4.8">
<Visible>False</Visible> <Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 and x64%29</ProductName> <ProductName>Microsoft .NET Framework 4.8 %28x86 and x64%29</ProductName>
<Install>true</Install> <Install>true</Install>
</BootstrapperPackage> </BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
@ -1084,12 +1085,12 @@
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>"$(SignToolPath)signtool.exe" sign /f $(ProjectDir)\ENI2_6_TemporaryKey.pfx /p FgrMFUWsTVGQeb6L6i0e /fd SHA256 $(TargetPath)</PostBuildEvent> <PostBuildEvent>"$(SignToolPath)signtool.exe" sign /f $(ProjectDir)\ENI2_6_TemporaryKey.pfx /p FgrMFUWsTVGQeb6L6i0e /fd SHA256 $(TargetPath)</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<Import Project="packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" /> <Import Project="packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.117.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.117.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" /> <Error Condition="!Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.117.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.117.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
</Target> </Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -15,9 +15,9 @@ Sample license text.
<package id="Microsoft.Extensions.Primitives" version="8.0.0" targetFramework="net48" /> <package id="Microsoft.Extensions.Primitives" version="8.0.0" targetFramework="net48" />
<package id="Microsoft.Office.Interop.Excel" version="15.0.4795.1001" targetFramework="net48" /> <package id="Microsoft.Office.Interop.Excel" version="15.0.4795.1001" targetFramework="net48" />
<package id="PDFsharp-MigraDoc-GDI" version="6.1.1" targetFramework="net48" /> <package id="PDFsharp-MigraDoc-GDI" version="6.1.1" targetFramework="net48" />
<package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.119.0" targetFramework="net48" /> <package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.117.0" targetFramework="net48" />
<package id="System.Buffers" version="4.5.1" targetFramework="net48" /> <package id="System.Buffers" version="4.5.1" targetFramework="net48" />
<package id="System.Data.SQLite.Core" version="1.0.119.0" targetFramework="net48" /> <package id="System.Data.SQLite.Core" version="1.0.117.0" targetFramework="net48" />
<package id="System.Diagnostics.DiagnosticSource" version="8.0.1" targetFramework="net48" /> <package id="System.Diagnostics.DiagnosticSource" version="8.0.1" targetFramework="net48" />
<package id="System.Memory" version="4.5.5" targetFramework="net48" /> <package id="System.Memory" version="4.5.5" targetFramework="net48" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" /> <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />