Skip to content

Commit

Permalink
Merge branch 'Fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
Triky313 committed Apr 17, 2022
2 parents 6522d58 + aa612ae commit 150e6ad
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
5 changes: 5 additions & 0 deletions src/StatisticsAnalysisTool/Common/Locations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
1 change: 0 additions & 1 deletion src/StatisticsAnalysisTool/Languages/de-DE.xml
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,6 @@
<translation name="BOUGHT">Gekauft</translation>
<translation name="SOLD">Verkauft</translation>
<translation name="COST_PER_ITEM">Kosten pro Item</translation>
<translation name="TOTAL_COST">Gesamte Kosten</translation>
<translation name="DELETE_SELECTED_MAILS">Ausgewählte Nachrichten löschen</translation>
<translation name="SURE_YOU_WANT_TO_DELETE_SELECTED_MAIL">Ausgewählte Nachrichten wirklich löschen?</translation>
<translation name="MAIL_MONITORING_DESCRIPTION1">Um neue Nachrichten zu erkennen, muss im Spiel das Postfach geöffnet werden und zusätzlich jede Nachricht einmalig.</translation>
Expand Down
1 change: 0 additions & 1 deletion src/StatisticsAnalysisTool/Languages/en-US.xml
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,6 @@
<translation name="BOUGHT">Bought</translation>
<translation name="SOLD">Sold</translation>
<translation name="COST_PER_ITEM">Cost per item</translation>
<translation name="TOTAL_COST">Total cost</translation>
<translation name="DELETE_SELECTED_MAILS">Delete selected mails</translation>
<translation name="SURE_YOU_WANT_TO_DELETE_SELECTED_MAIL">Are you sure you want to delete selected mails?</translation>
<translation name="MAIL_MONITORING_DESCRIPTION1">In order to recognize new messages, the inbox must be opened in game and additionally each message once.</translation>
Expand Down
2 changes: 1 addition & 1 deletion src/StatisticsAnalysisTool/Models/Mail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class Mail : IComparable<Mail>, 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);
Expand Down
10 changes: 5 additions & 5 deletions src/StatisticsAnalysisTool/Network/Manager/MailController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/StatisticsAnalysisTool/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
[assembly: AssemblyVersion("5.6.2.*")]
[assembly: AssemblyFileVersion("5.6.2.0")]

0 comments on commit 150e6ad

Please sign in to comment.