using Avalonia; using Avalonia.Data.Converters; namespace SourceGit.Converters { public static class IntConverters { public static readonly FuncValueConverter IsGreaterThanZero = new FuncValueConverter(v => v > 0); public static readonly FuncValueConverter IsGreaterThanFour = new FuncValueConverter(v => v > 4); public static readonly FuncValueConverter IsZero = new FuncValueConverter(v => v == 0); public static readonly FuncValueConverter IsOne = new FuncValueConverter(v => v == 1); public static readonly FuncValueConverter IsNotOne = new FuncValueConverter(v => v != 1); public static readonly FuncValueConverter IsSubjectLengthBad = new FuncValueConverter(v => v > ViewModels.Preference.Instance.SubjectGuideLength); public static readonly FuncValueConverter IsSubjectLengthGood = new FuncValueConverter(v => v <= ViewModels.Preference.Instance.SubjectGuideLength); public static readonly FuncValueConverter ToTreeMargin = new FuncValueConverter(v => new Thickness(v * 16, 0, 0, 0)); } }