summaryrefslogtreecommitdiff
path: root/Decompiler/Gestor.Application.Converters/EnviadoColorConverter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Decompiler/Gestor.Application.Converters/EnviadoColorConverter.cs')
-rw-r--r--Decompiler/Gestor.Application.Converters/EnviadoColorConverter.cs78
1 files changed, 78 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.Converters/EnviadoColorConverter.cs b/Decompiler/Gestor.Application.Converters/EnviadoColorConverter.cs
new file mode 100644
index 0000000..9890192
--- /dev/null
+++ b/Decompiler/Gestor.Application.Converters/EnviadoColorConverter.cs
@@ -0,0 +1,78 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+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 EnviadoColorConverter : 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_00b4: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b9: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00bf: Expected O, but got Unknown
+ //IL_00c3: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00c8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ce: Expected O, but got Unknown
+ //IL_0136: Unknown result type (might be due to invalid IL or missing references)
+ //IL_013b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0141: Expected O, but got Unknown
+ //IL_00d8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00dd: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00e3: Expected O, but got Unknown
+ //IL_0101: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0106: Unknown result type (might be due to invalid IL or missing references)
+ //IL_010c: Expected O, but got Unknown
+ //IL_012b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0130: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0136: Expected O, but got Unknown
+ if (value != null && value is List<StatusDocumentoAssinado>)
+ {
+ List<StatusDocumentoAssinado> source = (List<StatusDocumentoAssinado>)value;
+ int num = source.Count((StatusDocumentoAssinado x) => (int)x.Status == 1 || (int)x.Status == 4);
+ int num2 = source.Count((StatusDocumentoAssinado x) => (int)x.Status == 0);
+ int num3 = source.Count((StatusDocumentoAssinado x) => (int)x.Status == 2);
+ if (!source.All((StatusDocumentoAssinado x) => (int)x.Status == 3))
+ {
+ if (num3 <= 0)
+ {
+ if (num > 0 && num2 == 0 && num3 == 0)
+ {
+ return (object)new SolidColorBrush(Colors.ForestGreen);
+ }
+ if (num == 0 && num2 > 0 && num3 == 0)
+ {
+ return (object)new SolidColorBrush((Color)Application.Current.Resources[(object)"AggerBlue"]);
+ }
+ if (num > 0 && num2 > 0 && num3 == 0)
+ {
+ return (object)new SolidColorBrush((Color)Application.Current.Resources[(object)"AggerYellow100"]);
+ }
+ return (object)new SolidColorBrush(Colors.IndianRed);
+ }
+ return (object)new SolidColorBrush(Colors.Red);
+ }
+ return (object)new SolidColorBrush(Colors.IndianRed);
+ }
+ return (object)new SolidColorBrush(Colors.IndianRed);
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return null;
+ }
+
+ public override object ProvideValue(IServiceProvider serviceProvider)
+ {
+ return this;
+ }
+}