feature<WorkingCopy>: finish recent commit message picker

This commit is contained in:
leo 2024-02-18 15:44:05 +08:00
parent 88b9b0fb2f
commit b40ca42d73
6 changed files with 45 additions and 28 deletions

View file

@ -1,6 +1,4 @@
using Avalonia.Data.Converters;
using System;
using System.Globalization;
namespace SourceGit.Converters {
public static class IntConverters {
@ -10,18 +8,7 @@ namespace SourceGit.Converters {
public static FuncValueConverter<int, bool> IsZero =
new FuncValueConverter<int, bool>(v => v == 0);
public class NotEqualConverter : IValueConverter {
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {
int v = (int)value;
int target = (int)parameter;
return v != target;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) {
throw new NotImplementedException();
}
}
public static NotEqualConverter NotEqual = new NotEqualConverter();
public static FuncValueConverter<int, bool> IsOne =
new FuncValueConverter<int, bool>(v => v == 1);
}
}