From 74665defb36238eb5a04e757ae46c7fa34c81380 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Fri, 18 Oct 2024 17:13:43 +0200 Subject: [PATCH 01/16] Replaced MessageBox, returned to sqlite Version 117 --- ENI2/App.config | 34 +++++++++++++++++++++++++++------- ENI2/App.xaml.cs | 14 +++++++++----- ENI2/ENI2.csproj | 19 ++++++++++--------- ENI2/packages.config | 4 ++-- 4 files changed, 48 insertions(+), 23 deletions(-) diff --git a/ENI2/App.config b/ENI2/App.config index e2844eac..3493f0f7 100644 --- a/ENI2/App.config +++ b/ENI2/App.config @@ -1,18 +1,18 @@ - + -
+
-
+
- - + + @@ -70,11 +70,31 @@ - + - + + + + + + + + + + + + + + + + + + + + + diff --git a/ENI2/App.xaml.cs b/ENI2/App.xaml.cs index c8c948e5..d1335ca9 100644 --- a/ENI2/App.xaml.cs +++ b/ENI2/App.xaml.cs @@ -6,6 +6,8 @@ using System.Windows; using System.Windows.Markup; using bsmd.database; +using log4net; + using System.Windows.Controls; using System.Windows.Input; using System; @@ -14,13 +16,15 @@ using ENI2.LockingServiceReference; using ENI2.Util; using System.Threading; using System.Threading.Tasks; +using Microsoft.Office.Interop.Excel; +using System.Drawing.Drawing2D; namespace ENI2 { /// /// Interaction logic for App.xaml /// - public partial class App : Application + public partial class App : System.Windows.Application { // "global" statics, da gibt es sicher noch einen eleganteren Weg.. private static ServiceClient _lockingServiceClient = null; @@ -31,6 +35,8 @@ namespace ENI2 private ManualResetEvent ResetSplashCreated; private Thread _splashThread; + private ILog _log = LogManager.GetLogger(typeof(App).Name); + public App() : base() { this.Dispatcher.UnhandledException += Dispatcher_UnhandledException; @@ -69,12 +75,10 @@ namespace ENI2 // initialize static / localized lookups from sqlite database string langKey = CultureInfo.CurrentCulture.TwoLetterISOLanguageName; - Dictionary cargoHandlingDict = LocalizedLookup.getLADGCargoHandlingStrings(langKey); foreach (int key in cargoHandlingDict.Keys) LADG.CargoHandlingDict.Add(key, cargoHandlingDict[key]); LADG.MVSHLocodes.AddRange(LocalizedLookup.getMVSHLocodes()); - EventManager.RegisterClassHandler(typeof(DatePicker), DatePicker.PreviewKeyDownEvent, new KeyEventHandler(this.DatePicker_PreviewKeyDown)); CREW.NationalityDict = LocalizedLookup.getNationalities(); STAT.VesselTypeDict = LocalizedLookup.getVesselTypes(); @@ -155,9 +159,9 @@ namespace ENI2 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); - MessageBox.Show(errorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error); - // TODO: Dieser Fehler muss irgendwohin gesendet / gespeichert werden + Xceed.Wpf.Toolkit.MessageBox.Show(errorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error); e.Handled = true; + _log.Error(errorMessage); } private void DatePicker_PreviewKeyDown(object sender, KeyEventArgs e) diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj index 11a2cadc..c5d985db 100644 --- a/ENI2/ENI2.csproj +++ b/ENI2/ENI2.csproj @@ -36,8 +36,8 @@ 5.4.0.0 true publish.html - 3 - 7.2.4.2 + 6 + 7.2.4.6 false true true @@ -62,7 +62,8 @@ bin\Release\ TRACE prompt - 4 + 0 + false ENI2.App @@ -198,8 +199,8 @@ - - packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\lib\net46\System.Data.SQLite.dll + + packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.117.0\lib\net46\System.Data.SQLite.dll packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll @@ -981,9 +982,9 @@ - + False - Microsoft .NET Framework 4.5.2 %28x86 and x64%29 + Microsoft .NET Framework 4.8 %28x86 and x64%29 true @@ -1083,12 +1084,12 @@ "$(SignToolPath)signtool.exe" sign /f $(ProjectDir)\ENI2_6_TemporaryKey.pfx /p FgrMFUWsTVGQeb6L6i0e /fd SHA256 $(TargetPath) - + 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}. - + -
+
-
+
- + @@ -26,75 +26,28 @@ 1000 - http://192.168.2.24/LockingService/LockingService.svc - - - BSMD ReportGenerator + http://192.168.2.24/LockingService/LockingService.svc - Initial Catalog=nswtest;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false + Initial Catalog=nsw;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false - - - - 825 - - - 450 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 + - + - + - - - - - - - - - - - - - - - - - - - - diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj index a1f2d41d..83371368 100644 --- a/ENI2/ENI2.csproj +++ b/ENI2/ENI2.csproj @@ -8,7 +8,7 @@ WinExe Properties ENI2 - ENI2Test + ENI2 v4.8 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} @@ -18,7 +18,7 @@ - eni_test\ + eni2.publish\ true Web true @@ -28,9 +28,9 @@ false false true - http://192.168.2.24/eni_test/ + http://192.168.2.24/eni2.publish/ http://www.textbausteine.net/ - ENI Testversion + ENI Informatikbüro Daniel Schick NSW 5.4.0.0 diff --git a/ENI2/EditControls/CompareExcelDialog.xaml b/ENI2/EditControls/CompareExcelDialog.xaml index e77d7a89..c789a0dc 100644 --- a/ENI2/EditControls/CompareExcelDialog.xaml +++ b/ENI2/EditControls/CompareExcelDialog.xaml @@ -4,11 +4,11 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:ENI2.EditControls" - xmlns:enictrl="clr-namespace:ENI2.Controls" + xmlns:enictrl="clr-namespace:ENI2.Controls" xmlns:p="clr-namespace:ENI2.Properties" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" mc:Ignorable="d" - Title="{x:Static p:Resources.textCompareExcel}" Height="260" Width="600" Background="AliceBlue" Icon="/ENI2Test;component/Resources/bullet_ball_grey.ico"> + Title="{x:Static p:Resources.textCompareExcel}" Height="260" Width="600" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_grey.ico"> diff --git a/ENI2/EditControls/CopyDeclarationDialog.xaml b/ENI2/EditControls/CopyDeclarationDialog.xaml index ab1978e3..46ad36ec 100644 --- a/ENI2/EditControls/CopyDeclarationDialog.xaml +++ b/ENI2/EditControls/CopyDeclarationDialog.xaml @@ -4,11 +4,11 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:ENI2.EditControls" - xmlns:enictrl="clr-namespace:ENI2.Controls" + xmlns:enictrl="clr-namespace:ENI2.Controls" xmlns:p="clr-namespace:ENI2.Properties" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" mc:Ignorable="d" - Title="{x:Static p:Resources.textCopyDeclaration}" Height="326" Width="440" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2Test;component/Resources/id_cards.ico"> + Title="{x:Static p:Resources.textCopyDeclaration}" Height="326" Width="440" WindowStyle="SingleBorderWindow" Background="AliceBlue" ResizeMode="NoResize" Icon="/ENI2;component/Resources/id_cards.ico"> @@ -34,28 +34,28 @@ - \ No newline at end of file diff --git a/ENI2/EditControls/CoreStatusInfoDialog.xaml b/ENI2/EditControls/CoreStatusInfoDialog.xaml index b09b092d..8dc5339f 100644 --- a/ENI2/EditControls/CoreStatusInfoDialog.xaml +++ b/ENI2/EditControls/CoreStatusInfoDialog.xaml @@ -8,7 +8,7 @@ xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:p="clr-namespace:ENI2.Properties" mc:Ignorable="d" - Title="{x:Static p:Resources.textCoreStatus}" Height="436" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/ENI2Test;component/Resources/bullet_ball_grey.ico" > + Title="{x:Static p:Resources.textCoreStatus}" Height="436" Width="600" WindowStyle="SingleBorderWindow" Background="AliceBlue" Icon="/ENI2;component/Resources/bullet_ball_grey.ico" > @@ -22,7 +22,7 @@ - +