2024-02-05 23:08:37 -08:00
|
|
|
|
using Avalonia.Data.Converters;
|
|
|
|
|
|
2024-03-17 18:37:06 -07:00
|
|
|
|
namespace SourceGit.Converters
|
|
|
|
|
{
|
|
|
|
|
public static class IntConverters
|
|
|
|
|
{
|
2024-03-31 01:54:29 -07:00
|
|
|
|
public static readonly FuncValueConverter<int, bool> IsGreaterThanZero =
|
2024-02-05 23:08:37 -08:00
|
|
|
|
new FuncValueConverter<int, bool>(v => v > 0);
|
|
|
|
|
|
2024-03-31 01:54:29 -07:00
|
|
|
|
public static readonly FuncValueConverter<int, bool> IsZero =
|
2024-02-05 23:08:37 -08:00
|
|
|
|
new FuncValueConverter<int, bool>(v => v == 0);
|
|
|
|
|
|
2024-03-31 01:54:29 -07:00
|
|
|
|
public static readonly FuncValueConverter<int, bool> IsOne =
|
2024-02-17 23:44:05 -08:00
|
|
|
|
new FuncValueConverter<int, bool>(v => v == 1);
|
2024-04-01 04:59:15 -07:00
|
|
|
|
|
|
|
|
|
public static readonly FuncValueConverter<int, bool> IsNotOne =
|
|
|
|
|
new FuncValueConverter<int, bool>(v => v != 1);
|
2024-02-05 23:08:37 -08:00
|
|
|
|
}
|
2024-03-31 01:54:29 -07:00
|
|
|
|
}
|