summaryrefslogtreecommitdiff
path: root/Decompiler/Gestor.Application.Converters/StatusPagamentoColorConverter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Decompiler/Gestor.Application.Converters/StatusPagamentoColorConverter.cs')
-rw-r--r--Decompiler/Gestor.Application.Converters/StatusPagamentoColorConverter.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.Converters/StatusPagamentoColorConverter.cs b/Decompiler/Gestor.Application.Converters/StatusPagamentoColorConverter.cs
new file mode 100644
index 0000000..224990e
--- /dev/null
+++ b/Decompiler/Gestor.Application.Converters/StatusPagamentoColorConverter.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Globalization;
+using System.Windows;
+using System.Windows.Data;
+using System.Windows.Markup;
+using System.Windows.Media;
+using Gestor.Model.Common;
+
+namespace Gestor.Application.Converters;
+
+public class StatusPagamentoColorConverter : MarkupExtension, IValueConverter
+{
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ //IL_000b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0010: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0016: Expected O, but got Unknown
+ //IL_0004: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0017: Unknown result type (might be due to invalid IL or missing references)
+ //IL_001d: Invalid comparison between Unknown and I4
+ //IL_003e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0043: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0049: Expected O, but got Unknown
+ //IL_001f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0024: Unknown result type (might be due to invalid IL or missing references)
+ //IL_002a: Expected O, but got Unknown
+ if (value != null && (int)(StatusPagamento)value != 0)
+ {
+ if ((int)(StatusPagamento)value == 2)
+ {
+ return (object)new SolidColorBrush((Color)Application.Current.Resources[(object)"AggerBlue"]);
+ }
+ return (object)new SolidColorBrush(Colors.Red);
+ }
+ return (object)new SolidColorBrush(Colors.Gray);
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return null;
+ }
+
+ public override object ProvideValue(IServiceProvider serviceProvider)
+ {
+ return this;
+ }
+}