Donations are sorted ascending

This commit is contained in:
BONNEVILLE Geoffroy
2017-12-11 11:08:33 +01:00
parent 35f64eec1b
commit 50c5940a0a
2 changed files with 10 additions and 2 deletions

View File

@@ -26,8 +26,16 @@ namespace ModernKeePass.ViewModels
public DonateVm(ILicenseService license)
{
var usNfi = new NumberFormatInfo
{
NegativeSign = "-",
NumberDecimalSeparator = ".",
NumberGroupSeparator = ",",
CurrencySymbol = "$"
};
_license = license;
Donations = new ObservableCollection<ProductListing>(_license.Products.Values.OrderBy(p => /*decimal.Parse(*/p.FormattedPrice/*, NumberStyles.Currency | NumberStyles.AllowDecimalPoint)*/));
Donations = new ObservableCollection<ProductListing>(
_license.Products.Values.OrderBy(p => decimal.Parse(p.FormattedPrice, NumberStyles.Currency, usNfi)));
}
public async Task<int> Purchase()