mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2025-01-08 01:42:49 +01:00
16 lines
488 B
C#
16 lines
488 B
C#
using System;
|
|
using System.Globalization;
|
|
using Avalonia.Data.Converters;
|
|
|
|
namespace DHT.Desktop.App.Common;
|
|
|
|
sealed class NumberValueConverter : IValueConverter {
|
|
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture) {
|
|
return value == null ? "-" : string.Format(Program.Culture, "{0:n0}", value);
|
|
}
|
|
|
|
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) {
|
|
throw new NotSupportedException();
|
|
}
|
|
}
|