2026-06-12 11:47:23 +02:00
|
|
|
using System;
|
|
|
|
|
using System.Globalization;
|
|
|
|
|
using Avalonia;
|
|
|
|
|
using Avalonia.Data.Converters;
|
|
|
|
|
using Avalonia.Media;
|
|
|
|
|
|
|
|
|
|
namespace PalladiumWallet.App.ViewModels;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2026-06-16 14:40:06 +02:00
|
|
|
/// bool → brush: the wallet's own addresses ("our" inputs/outputs) are
|
|
|
|
|
/// highlighted in green, the others use the default text color.
|
2026-06-12 11:47:23 +02:00
|
|
|
/// </summary>
|
|
|
|
|
public sealed class MineColorConverter : IValueConverter
|
|
|
|
|
{
|
|
|
|
|
public static readonly MineColorConverter Instance = new();
|
|
|
|
|
|
|
|
|
|
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) =>
|
|
|
|
|
value is true ? Brushes.MediumSeaGreen : AvaloniaProperty.UnsetValue;
|
|
|
|
|
|
|
|
|
|
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) =>
|
|
|
|
|
throw new NotSupportedException();
|
|
|
|
|
}
|