mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Donations are sorted ascending
This commit is contained in:
@@ -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()
|
||||
|
@@ -16,7 +16,7 @@
|
||||
x:Name="DonateItemsSource"
|
||||
Source="{Binding Donations}" />
|
||||
</Page.Resources>
|
||||
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Margin="10,0,0,0">
|
||||
<TextBlock x:Uid="DonateDesc" Style="{StaticResource BodyTextBlockStyle}" />
|
||||
<ItemsControl ItemsSource="{Binding Source={StaticResource DonateItemsSource}}" Margin="0,10,0,10">
|
||||
<ItemsControl.ItemTemplate>
|
||||
|
Reference in New Issue
Block a user