From 70848aa5e64acec705d5b1ed2e5cd7f2986fd632 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sun, 17 Apr 2022 15:35:03 +0200 Subject: [PATCH 1/3] Remove duplicated translation --- src/StatisticsAnalysisTool/Languages/de-DE.xml | 1 - src/StatisticsAnalysisTool/Languages/en-US.xml | 1 - 2 files changed, 2 deletions(-) diff --git a/src/StatisticsAnalysisTool/Languages/de-DE.xml b/src/StatisticsAnalysisTool/Languages/de-DE.xml index bb76c3a99..93bbdc6c5 100644 --- a/src/StatisticsAnalysisTool/Languages/de-DE.xml +++ b/src/StatisticsAnalysisTool/Languages/de-DE.xml @@ -542,7 +542,6 @@ Gekauft Verkauft Kosten pro Item - Gesamte Kosten Ausgewählte Nachrichten löschen Ausgewählte Nachrichten wirklich löschen? Um neue Nachrichten zu erkennen, muss im Spiel das Postfach geöffnet werden und zusätzlich jede Nachricht einmalig. diff --git a/src/StatisticsAnalysisTool/Languages/en-US.xml b/src/StatisticsAnalysisTool/Languages/en-US.xml index 084779fb0..3689cf00b 100644 --- a/src/StatisticsAnalysisTool/Languages/en-US.xml +++ b/src/StatisticsAnalysisTool/Languages/en-US.xml @@ -542,7 +542,6 @@ Bought Sold Cost per item - Total cost Delete selected mails Are you sure you want to delete selected mails? In order to recognize new messages, the inbox must be opened in game and additionally each message once. From 3b5ca78b611d115e0e95a4db23f063190c8d2aa8 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sun, 17 Apr 2022 16:01:50 +0200 Subject: [PATCH 2/3] Fixed a mail filtering exception --- src/StatisticsAnalysisTool/Common/Locations.cs | 5 +++++ src/StatisticsAnalysisTool/Models/Mail.cs | 2 +- .../Network/Manager/MailController.cs | 10 +++++----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/StatisticsAnalysisTool/Common/Locations.cs b/src/StatisticsAnalysisTool/Common/Locations.cs index a74e28665..4d122fb51 100644 --- a/src/StatisticsAnalysisTool/Common/Locations.cs +++ b/src/StatisticsAnalysisTool/Common/Locations.cs @@ -65,6 +65,11 @@ public static Location GetName(string location) public static Location GetLocationByIndex(string index) { + if (index.Equals("@BLACK_MARKET")) + { + return Location.BlackMarket; + } + return Enum.TryParse(index, true, out Location location) ? location : Location.Unknown; } diff --git a/src/StatisticsAnalysisTool/Models/Mail.cs b/src/StatisticsAnalysisTool/Models/Mail.cs index c30e8d3a8..b87c76f06 100644 --- a/src/StatisticsAnalysisTool/Models/Mail.cs +++ b/src/StatisticsAnalysisTool/Models/Mail.cs @@ -23,7 +23,7 @@ public class Mail : IComparable, INotifyPropertyChanged [JsonIgnore] public Location Location => Locations.GetLocationByIndex(ClusterIndex); [JsonIgnore] - public string LocationName => Locations.GetName(Location); + public string LocationName => Locations.GetName(Location) ?? LanguageController.Translation("UNKNOWN"); public string MailTypeText { get; set; } [JsonIgnore] public MailType MailType => MailController.ConvertToMailType(MailTypeText); diff --git a/src/StatisticsAnalysisTool/Network/Manager/MailController.cs b/src/StatisticsAnalysisTool/Network/Manager/MailController.cs index d4bf076d4..58a9b2068 100644 --- a/src/StatisticsAnalysisTool/Network/Manager/MailController.cs +++ b/src/StatisticsAnalysisTool/Network/Manager/MailController.cs @@ -192,11 +192,11 @@ public bool Filter(object obj) return obj is Mail mail && mail.Timestamp.Date >= _mainWindowViewModel?.DatePickerMailsFrom.Date && mail.Timestamp.Date <= _mainWindowViewModel?.DatePickerMailsTo.Date && ( - mail.LocationName.ToLower().Contains(_mainWindowViewModel?.MailsSearchText?.ToLower() ?? string.Empty) - || mail.MailTypeDescription.ToLower().Contains(_mainWindowViewModel?.MailsSearchText?.ToLower() ?? string.Empty) - || mail.Item.LocalizedName.ToLower().Contains(_mainWindowViewModel?.MailsSearchText?.ToLower() ?? string.Empty) - || mail.MailContent.UnitPrice.ToString().Contains(_mainWindowViewModel?.MailsSearchText?.ToLower() ?? string.Empty) - || mail.MailContent.TotalPrice.ToString().Contains(_mainWindowViewModel?.MailsSearchText?.ToLower() ?? string.Empty)); + (mail.LocationName != null && mail.LocationName.ToLower().Contains(_mainWindowViewModel?.MailsSearchText?.ToLower() ?? string.Empty)) + || mail.MailTypeDescription.ToLower().Contains(_mainWindowViewModel?.MailsSearchText?.ToLower() ?? string.Empty) + || (mail.Item != null && mail.Item.LocalizedName.ToLower().Contains(_mainWindowViewModel?.MailsSearchText?.ToLower() ?? string.Empty)) + || mail.MailContent.UnitPrice.ToString().Contains(_mainWindowViewModel?.MailsSearchText?.ToLower() ?? string.Empty) + || mail.MailContent.TotalPrice.ToString().Contains(_mainWindowViewModel?.MailsSearchText?.ToLower() ?? string.Empty)); } #endregion From aa612ae6761521687566c8ecd7087ae702741d17 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sun, 17 Apr 2022 16:04:50 +0200 Subject: [PATCH 3/3] Version increased --- src/StatisticsAnalysisTool/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/StatisticsAnalysisTool/Properties/AssemblyInfo.cs b/src/StatisticsAnalysisTool/Properties/AssemblyInfo.cs index 6ca0c02bb..eb2a94bbc 100644 --- a/src/StatisticsAnalysisTool/Properties/AssemblyInfo.cs +++ b/src/StatisticsAnalysisTool/Properties/AssemblyInfo.cs @@ -53,5 +53,5 @@ // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // indem Sie "*" wie unten gezeigt eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("5.6.1.*")] -[assembly: AssemblyFileVersion("5.6.1.0")] \ No newline at end of file +[assembly: AssemblyVersion("5.6.2.*")] +[assembly: AssemblyFileVersion("5.6.2.0")] \ No newline at end of file