diff options
Diffstat (limited to 'Decompiler/Gestor.Application.Converters/BoletosNotasConverter.cs')
| -rw-r--r-- | Decompiler/Gestor.Application.Converters/BoletosNotasConverter.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.Converters/BoletosNotasConverter.cs b/Decompiler/Gestor.Application.Converters/BoletosNotasConverter.cs new file mode 100644 index 0000000..ca5b144 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/BoletosNotasConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Application.Model.Ajuda; + +namespace Gestor.Application.Converters; + +public class BoletosNotasConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return (object)(Visibility)(string.IsNullOrEmpty(((Boleto)value).Nota) ? 1 : 0); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} |