diff --git a/ENI2/App.config b/ENI2/App.config index 4c7c4bc1..19aba5a3 100644 --- a/ENI2/App.config +++ b/ENI2/App.config @@ -1,18 +1,18 @@ - + -
+
-
+
- + @@ -36,18 +36,38 @@ - + - + - + + + + + + + + + + + + + + + + + + + + + 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 bef488dc..714c715e 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 @@ -199,8 +200,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 @@ -982,9 +983,9 @@ - + False - Microsoft .NET Framework 4.5.2 %28x86 and x64%29 + Microsoft .NET Framework 4.8 %28x86 and x64%29 true @@ -1084,12 +1085,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}. - +