mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2025-08-18 13:31:42 +02:00
.github
.idea
app
.idea
Desktop
Common
AvaloniaReflection.cs
BytesValueConverter.cs
DatabaseGui.cs
NumberValueConverter.cs
SystemUtils.cs
TextFormat.cs
Dialogs
Discord
Main
Resources
Server
App.axaml
App.axaml.cs
Arguments.cs
Desktop.csproj
Program.cs
Resources
Server
Utils
.editorconfig
.gitignore
Directory.Build.props
DiscordHistoryTracker.sln
NuGet.Config
Version.cs
build.sh
build.wsl.sh
empty.dht
global.json
tools
web
.gitattributes
.gitignore
LICENSE.md
README.md
16 lines
485 B
C#
16 lines
485 B
C#
using System;
|
|
using System.Globalization;
|
|
using Avalonia.Data.Converters;
|
|
|
|
namespace DHT.Desktop.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();
|
|
}
|
|
}
|