diff options
Diffstat (limited to 'Decompiler/Gestor.Application.Converters')
71 files changed, 2886 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.Converters/ActualHeightConverter.cs b/Decompiler/Gestor.Application.Converters/ActualHeightConverter.cs new file mode 100644 index 0000000..b48c8e4 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/ActualHeightConverter.cs @@ -0,0 +1,28 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class ActualHeightConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null) + { + return 0; + } + return (double)value - 20.0; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/ArquivoDigitalVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/ArquivoDigitalVisibilityConverter.cs new file mode 100644 index 0000000..cd991aa --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/ArquivoDigitalVisibilityConverter.cs @@ -0,0 +1,25 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class ArquivoDigitalVisibilityConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return (object)(Visibility)((value == null) ? 2 : 0); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/AssinaturasVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/AssinaturasVisibilityConverter.cs new file mode 100644 index 0000000..00ff6f6 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/AssinaturasVisibilityConverter.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class AssinaturasVisibilityConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return (object)(Visibility)((value == null || ((List<StatusDocumentoAssinado>)value).Count == 0) ? 2 : 0); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/AssistenciaVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/AssistenciaVisibilityConverter.cs new file mode 100644 index 0000000..a9a00ac --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/AssistenciaVisibilityConverter.cs @@ -0,0 +1,32 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class AssistenciaVisibilityConverter : 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_0011: Invalid comparison between Unknown and I4 + if (value == null) + { + return (object)(Visibility)2; + } + return (object)(Visibility)(((int)(TipoContatoSeguradora)value != 1) ? 2 : 0); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/AtivoToColorConverter.cs b/Decompiler/Gestor.Application.Converters/AtivoToColorConverter.cs new file mode 100644 index 0000000..2aa6b61 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/AtivoToColorConverter.cs @@ -0,0 +1,36 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; +using System.Windows.Media; + +namespace Gestor.Application.Converters; + +public class AtivoToColorConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0030: Unknown result type (might be due to invalid IL or missing references) + //IL_0035: Unknown result type (might be due to invalid IL or missing references) + //IL_003b: Expected O, but got Unknown + //IL_0025: Unknown result type (might be due to invalid IL or missing references) + //IL_002a: Unknown result type (might be due to invalid IL or missing references) + //IL_0030: Expected O, but got Unknown + if (((bool?)value).GetValueOrDefault(true)) + { + return (object)new SolidColorBrush(Colors.Red); + } + return (object)new SolidColorBrush((Color)Application.Current.Resources[(object)"AggerBlue"]); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/AtivoToStringConverter.cs b/Decompiler/Gestor.Application.Converters/AtivoToStringConverter.cs new file mode 100644 index 0000000..cad9a10 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/AtivoToStringConverter.cs @@ -0,0 +1,28 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class AtivoToStringConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (!((bool?)value).GetValueOrDefault(true)) + { + return "ATIVAR"; + } + return "INATIVAR"; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/BaixarVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/BaixarVisibilityConverter.cs new file mode 100644 index 0000000..2e39617 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/BaixarVisibilityConverter.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class BaixarVisibilityConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0027: Unknown result type (might be due to invalid IL or missing references) + if (value == null) + { + return (object)(Visibility)2; + } + return (object)(Visibility)(new List<StatusParcela> + { + (StatusParcela)1, + (StatusParcela)13, + (StatusParcela)10 + }.Contains((StatusParcela)value) ? 2 : 0); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} 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; + } +} diff --git a/Decompiler/Gestor.Application.Converters/BoolToGridHeightOneStarConverter.cs b/Decompiler/Gestor.Application.Converters/BoolToGridHeightOneStarConverter.cs new file mode 100644 index 0000000..5f761a1 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/BoolToGridHeightOneStarConverter.cs @@ -0,0 +1,37 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class BoolToGridHeightOneStarConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0052: Unknown result type (might be due to invalid IL or missing references) + //IL_005c: Unknown result type (might be due to invalid IL or missing references) + //IL_0033: Unknown result type (might be due to invalid IL or missing references) + int num = 1; + if (parameter != null && int.TryParse(parameter.ToString(), out var result)) + { + num = result; + } + if (value != null && (bool)value && num == 1000) + { + return (object)new GridLength(1.0, (GridUnitType)0); + } + return (object)((value != null && (bool)value) ? new GridLength((double)num, (GridUnitType)2) : new GridLength(0.0)); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/CalculoIconConverter.cs b/Decompiler/Gestor.Application.Converters/CalculoIconConverter.cs new file mode 100644 index 0000000..579f79b --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/CalculoIconConverter.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Domain.Aggilizador; + +namespace Gestor.Application.Converters; + +public class CalculoIconConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + Uri result = new Uri("pack://application:,,,Gestor.Application;component/Assets/Images/CalculoIcon.png"); + if (value != null) + { + if (!((List<Calculo>)value).Any((Calculo x) => (int)x.Status == 2)) + { + return new Uri("pack://application:,,,Gestor.Application;component/Assets/Images/CalculoIcon.png"); + } + return new Uri("pack://application:,,,Gestor.Application;component/Assets/Images/CalculoIconOk.png"); + } + return result; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return value; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/ColorStatusConverter.cs b/Decompiler/Gestor.Application.Converters/ColorStatusConverter.cs new file mode 100644 index 0000000..394b892 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/ColorStatusConverter.cs @@ -0,0 +1,83 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Media; +using Gestor.Model.Common; +using Gestor.Model.Validation; + +namespace Gestor.Application.Converters; + +public class ColorStatusConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + //IL_0038: Unknown result type (might be due to invalid IL or missing references) + //IL_003d: Unknown result type (might be due to invalid IL or missing references) + //IL_0043: Expected O, but got Unknown + //IL_0046: Unknown result type (might be due to invalid IL or missing references) + //IL_004b: Unknown result type (might be due to invalid IL or missing references) + //IL_004c: Unknown result type (might be due to invalid IL or missing references) + //IL_004e: Unknown result type (might be due to invalid IL or missing references) + //IL_0068: Expected I4, but got Unknown + //IL_0019: Unknown result type (might be due to invalid IL or missing references) + //IL_001e: Unknown result type (might be due to invalid IL or missing references) + //IL_0024: Expected O, but got Unknown + //IL_00de: Unknown result type (might be due to invalid IL or missing references) + //IL_00e3: Unknown result type (might be due to invalid IL or missing references) + //IL_00e9: Expected O, but got Unknown + //IL_00c8: Unknown result type (might be due to invalid IL or missing references) + //IL_00cd: Unknown result type (might be due to invalid IL or missing references) + //IL_00d3: Expected O, but got Unknown + //IL_00d3: Unknown result type (might be due to invalid IL or missing references) + //IL_00d8: Unknown result type (might be due to invalid IL or missing references) + //IL_00de: Expected O, but got Unknown + //IL_00e9: Unknown result type (might be due to invalid IL or missing references) + //IL_00ee: Unknown result type (might be due to invalid IL or missing references) + //IL_00f4: Expected O, but got Unknown + //IL_00f4: Unknown result type (might be due to invalid IL or missing references) + //IL_00f9: Unknown result type (might be due to invalid IL or missing references) + //IL_00ff: Expected O, but got Unknown + //IL_00bd: Unknown result type (might be due to invalid IL or missing references) + //IL_00c2: Unknown result type (might be due to invalid IL or missing references) + //IL_00c8: Expected O, but got Unknown + //IL_00b2: Unknown result type (might be due to invalid IL or missing references) + //IL_00b7: Unknown result type (might be due to invalid IL or missing references) + //IL_00bd: Expected O, but got Unknown + if (values[2] != null && values[2] is bool && (bool)values[2]) + { + return (object)new SolidColorBrush(Colors.Red); + } + object obj = values[0]; + if (obj != null) + { + if (obj is TipoSeguro) + { + TipoSeguro val = (TipoSeguro)values[0]; + switch (val - 3) + { + default: + if (values[1] != null && !((DateTime?)values[1] >= Funcoes.GetNetworkTime().Date.AddDays(-6.0))) + { + return (object)new SolidColorBrush(Colors.Goldenrod); + } + return (object)new SolidColorBrush(Colors.Green); + case 2: + return (object)new SolidColorBrush(Colors.DarkBlue); + case 3: + return (object)new SolidColorBrush(Colors.Gray); + case 0: + return (object)new SolidColorBrush(Colors.Red); + case 4: + return (object)new SolidColorBrush(Colors.DimGray); + } + } + return (object)new SolidColorBrush(Colors.White); + } + return (object)new SolidColorBrush(Colors.White); + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } +} diff --git a/Decompiler/Gestor.Application.Converters/ContatoSeguradoraVisibiltyConverter.cs b/Decompiler/Gestor.Application.Converters/ContatoSeguradoraVisibiltyConverter.cs new file mode 100644 index 0000000..c9bdc2f --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/ContatoSeguradoraVisibiltyConverter.cs @@ -0,0 +1,32 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class ContatoSeguradoraVisibiltyConverter : 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_0011: Invalid comparison between Unknown and I4 + if (value == null) + { + return (object)(Visibility)0; + } + return (object)(Visibility)(((int)(TipoContatoSeguradora)value == 1) ? 2 : 0); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/DesconsiderarVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/DesconsiderarVisibilityConverter.cs new file mode 100644 index 0000000..7cded32 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/DesconsiderarVisibilityConverter.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class DesconsiderarVisibilityConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0035: Unknown result type (might be due to invalid IL or missing references) + if (value == null) + { + return (object)(Visibility)2; + } + return (object)(Visibility)(new List<StatusParcela> + { + (StatusParcela)8, + (StatusParcela)6, + (StatusParcela)1, + (StatusParcela)13, + (StatusParcela)10 + }.Contains((StatusParcela)value) ? 2 : 0); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/DiasPentendesConverter.cs b/Decompiler/Gestor.Application.Converters/DiasPentendesConverter.cs new file mode 100644 index 0000000..806d6dc --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/DiasPentendesConverter.cs @@ -0,0 +1,28 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class DiasPentendesConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value != null) + { + return $"{value} DIAS"; + } + return ""; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/DocumentoEtiquetaConverter.cs b/Decompiler/Gestor.Application.Converters/DocumentoEtiquetaConverter.cs new file mode 100644 index 0000000..e25573b --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/DocumentoEtiquetaConverter.cs @@ -0,0 +1,32 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class DocumentoEtiquetaConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + //IL_000e: Unknown result type (might be due to invalid IL or missing references) + //IL_0014: Invalid comparison between Unknown and I4 + try + { + if (values == null) + { + return ""; + } + return ((int)(TipoProtocoloEtiqueta)values[0] == 1) ? " - " : values[1]; + } + catch + { + return ""; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } +} diff --git a/Decompiler/Gestor.Application.Converters/EmpresaNomeConverter.cs b/Decompiler/Gestor.Application.Converters/EmpresaNomeConverter.cs new file mode 100644 index 0000000..f41e7dd --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/EmpresaNomeConverter.cs @@ -0,0 +1,32 @@ +using System; +using System.Globalization; +using System.Linq; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Application.Helpers; +using Gestor.Model.Domain.Common; +using Gestor.Model.Domain.Generic; + +namespace Gestor.Application.Converters; + +public class EmpresaNomeConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value != null && (long)value != 0L) + { + return Recursos.Empresas.First((Empresa x) => ((DomainBase)x).Id == (long)value).Nome; + } + return Recursos.Empresas.First((Empresa x) => ((DomainBase)x).Id == 1).Nome; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/EnderecoConverter.cs b/Decompiler/Gestor.Application.Converters/EnderecoConverter.cs new file mode 100644 index 0000000..f72accd --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/EnderecoConverter.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Domain.Generic; +using Gestor.Model.Domain.Seguros; + +namespace Gestor.Application.Converters; + +public class EnderecoConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null) + { + return ""; + } + if (!(value is ObservableCollection<ClienteEndereco>)) + { + return ""; + } + ObservableCollection<ClienteEndereco> observableCollection = (ObservableCollection<ClienteEndereco>)value; + if (!string.IsNullOrWhiteSpace(((EnderecoBase)observableCollection[0]).Complemento)) + { + return ((EnderecoBase)observableCollection[0]).Endereco?.Trim() + ", " + ((EnderecoBase)observableCollection[0]).Numero?.Trim() + ", " + ((EnderecoBase)observableCollection[0]).Complemento.Trim() + ", " + ((EnderecoBase)observableCollection[0]).Bairro?.Trim() + " - " + ((EnderecoBase)observableCollection[0]).Cidade?.Trim() + "/" + ((EnderecoBase)observableCollection[0]).Estado?.Trim() + " - " + ((EnderecoBase)observableCollection[0]).Cep?.Trim(); + } + return ((EnderecoBase)observableCollection[0]).Endereco?.Trim() + ", " + ((EnderecoBase)observableCollection[0]).Numero?.Trim() + ", " + ((EnderecoBase)observableCollection[0]).Bairro?.Trim() + " - " + ((EnderecoBase)observableCollection[0]).Cidade?.Trim() + "/" + ((EnderecoBase)observableCollection[0]).Estado?.Trim() + " - " + ((EnderecoBase)observableCollection[0]).Cep?.Trim(); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} 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; + } +} diff --git a/Decompiler/Gestor.Application.Converters/EnviadoConverter.cs b/Decompiler/Gestor.Application.Converters/EnviadoConverter.cs new file mode 100644 index 0000000..dea1750 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/EnviadoConverter.cs @@ -0,0 +1,32 @@ +using System; +using System.Globalization; +using System.Linq; +using System.Windows; +using System.Windows.Data; + +namespace Gestor.Application.Converters; + +public class EnviadoConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + if (values.Any((object x) => x == null)) + { + return (object)(Visibility)2; + } + if (values[0] is bool && (bool)values[0]) + { + return (object)(Visibility)2; + } + if (values[1] is bool && (bool)values[1]) + { + return (object)(Visibility)0; + } + return (object)(Visibility)2; + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} diff --git a/Decompiler/Gestor.Application.Converters/EnviadoIconConverter.cs b/Decompiler/Gestor.Application.Converters/EnviadoIconConverter.cs new file mode 100644 index 0000000..00a1b14 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/EnviadoIconConverter.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Windows.Data; +using System.Windows.Markup; +using ControlzEx; +using Gestor.Model.Common; +using MaterialDesignThemes.Wpf; + +namespace Gestor.Application.Converters; + +public class EnviadoIconConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0000: Unknown result type (might be due to invalid IL or missing references) + //IL_0006: Expected O, but got Unknown + PackIcon val = new PackIcon(); + if (value == null || !(value is List<StatusDocumentoAssinado>)) + { + ((PackIconBase<PackIconKind>)(object)val).Kind = (PackIconKind)2689; + return val; + } + List<StatusDocumentoAssinado> source = (List<StatusDocumentoAssinado>)value; + int num = source.Count((StatusDocumentoAssinado x) => (int)x.Status == 1); + 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)) + { + ((PackIconBase<PackIconKind>)(object)val).Kind = (PackIconKind)2689; + } + if (num3 > 0) + { + ((PackIconBase<PackIconKind>)(object)val).Kind = (PackIconKind)789; + } + if (num > 0 && num2 == 0 && num3 == 0) + { + ((PackIconBase<PackIconKind>)(object)val).Kind = (PackIconKind)2685; + } + if (num == 0 && num2 > 0 && num3 == 0) + { + ((PackIconBase<PackIconKind>)(object)val).Kind = (PackIconKind)2685; + } + if (num > 0 && num2 > 0 && num3 == 0) + { + ((PackIconBase<PackIconKind>)(object)val).Kind = (PackIconKind)95; + } + return val; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/EnviadoTooTipConverter.cs b/Decompiler/Gestor.Application.Converters/EnviadoTooTipConverter.cs new file mode 100644 index 0000000..709759d --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/EnviadoTooTipConverter.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class EnviadoTooTipConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null || !(value is List<StatusDocumentoAssinado>)) + { + return ""; + } + 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)) + { + return "ASSINAR SELECIONADOS"; + } + if (num3 > 0) + { + return "HÁ ASSINATURAS REJEITADAS PARA ESSE DOCUMENTO"; + } + if (num > 0 && num2 == 0 && num3 == 0) + { + return "DOCUMENTO ASSINADO"; + } + if (num == 0 && num2 > 0 && num3 == 0) + { + return "ASSINATURA PENDENTE"; + } + if (num > 0 && num2 > 0 && num3 == 0) + { + return "CLIQUE PARA VERIFICAR O STATUS DAS ASSINATURAS"; + } + return "ASSINAR DOCUMENTOS"; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/EqualToCollapsedConverter.cs b/Decompiler/Gestor.Application.Converters/EqualToCollapsedConverter.cs new file mode 100644 index 0000000..d146d34 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/EqualToCollapsedConverter.cs @@ -0,0 +1,19 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; + +namespace Gestor.Application.Converters; + +public class EqualToCollapsedConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + return (object)(Visibility)((values[0] is long num && values[1] is long num2) ? ((num == num2) ? 2 : 0) : 0); + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } +} diff --git a/Decompiler/Gestor.Application.Converters/ExcluidoStringConverter.cs b/Decompiler/Gestor.Application.Converters/ExcluidoStringConverter.cs new file mode 100644 index 0000000..3009569 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/ExcluidoStringConverter.cs @@ -0,0 +1,28 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class ExcluidoStringConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (!(value is bool) || !(bool)value) + { + return ""; + } + return "EXCLUÍDO"; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/ExcluirVendedorLabelConverter.cs b/Decompiler/Gestor.Application.Converters/ExcluirVendedorLabelConverter.cs new file mode 100644 index 0000000..2bb0972 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/ExcluirVendedorLabelConverter.cs @@ -0,0 +1,28 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class ExcluirVendedorLabelConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (((DateTime?)value).HasValue) + { + return "EXCLUIR PAGAMENTO"; + } + return "EXCLUIR VENDEDOR"; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/ExpanderHeaderConverter.cs b/Decompiler/Gestor.Application.Converters/ExpanderHeaderConverter.cs new file mode 100644 index 0000000..490c2fc --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/ExpanderHeaderConverter.cs @@ -0,0 +1,36 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class ExpanderHeaderConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null) + { + return ""; + } + if (value is bool) + { + if (!(bool)value) + { + return $"MOSTRAR {parameter}"; + } + return $"OCULTAR {parameter}"; + } + return ""; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/ExtensaoVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/ExtensaoVisibilityConverter.cs new file mode 100644 index 0000000..91e2dbc --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/ExtensaoVisibilityConverter.cs @@ -0,0 +1,51 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; + +namespace Gestor.Application.Converters; + +public class ExtensaoVisibilityConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + if (values[0] == null || values[1] == null) + { + return (object)(Visibility)2; + } + if (values[0] != null && (long)values[0] > 0) + { + return (object)(Visibility)2; + } + if (!(values[1].ToString().ToLower() == ".pdf")) + { + return (object)(Visibility)2; + } + return (object)(Visibility)0; + } + catch (Exception) + { + return (object)(Visibility)2; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } + + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null) + { + return (object)(Visibility)2; + } + if (!(value.ToString().ToLower() == ".pdf")) + { + return (object)(Visibility)2; + } + return (object)(Visibility)0; + } +} diff --git a/Decompiler/Gestor.Application.Converters/FaturaVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/FaturaVisibilityConverter.cs new file mode 100644 index 0000000..c9be252 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/FaturaVisibilityConverter.cs @@ -0,0 +1,28 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class FaturaVisibilityConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0004: Unknown result type (might be due to invalid IL or missing references) + //IL_000a: Invalid comparison between Unknown and I4 + return (object)(Visibility)((value != null && (int)(TipoRecebimento)value == 1) ? 2 : 0); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/FilialStringConverter.cs b/Decompiler/Gestor.Application.Converters/FilialStringConverter.cs new file mode 100644 index 0000000..e9fa2f8 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/FilialStringConverter.cs @@ -0,0 +1,28 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class FilialStringConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (!(value is long) || (long)value != 1) + { + return $"FILIAL {value}"; + } + return ""; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/IdVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/IdVisibilityConverter.cs new file mode 100644 index 0000000..6445a29 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/IdVisibilityConverter.cs @@ -0,0 +1,25 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class IdVisibilityConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return (object)(Visibility)((value == null || (long)value == 0L) ? 2 : 0); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/IncluirApoliceEnabledConverter.cs b/Decompiler/Gestor.Application.Converters/IncluirApoliceEnabledConverter.cs new file mode 100644 index 0000000..d15054e --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/IncluirApoliceEnabledConverter.cs @@ -0,0 +1,31 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Gestor.Application.Converters; + +public class IncluirApoliceEnabledConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + if (values[0] == null || values[1] == null) + { + return false; + } + object obj = values[0]; + if (obj is bool && !(bool)obj) + { + return false; + } + if (!(values[1] is bool flag)) + { + return false; + } + return flag; + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } +} diff --git a/Decompiler/Gestor.Application.Converters/IntToMedalConverter.cs b/Decompiler/Gestor.Application.Converters/IntToMedalConverter.cs new file mode 100644 index 0000000..69a65ef --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/IntToMedalConverter.cs @@ -0,0 +1,55 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; +using System.Windows.Media; + +namespace Gestor.Application.Converters; + +public class IntToMedalConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0043: Unknown result type (might be due to invalid IL or missing references) + //IL_0076: Unknown result type (might be due to invalid IL or missing references) + //IL_0077: Unknown result type (might be due to invalid IL or missing references) + //IL_007d: Expected O, but got Unknown + //IL_0036: Unknown result type (might be due to invalid IL or missing references) + //IL_003b: Unknown result type (might be due to invalid IL or missing references) + //IL_0041: Expected O, but got Unknown + //IL_002b: Unknown result type (might be due to invalid IL or missing references) + //IL_0030: Unknown result type (might be due to invalid IL or missing references) + //IL_0036: Expected O, but got Unknown + //IL_0020: Unknown result type (might be due to invalid IL or missing references) + //IL_0025: Unknown result type (might be due to invalid IL or missing references) + //IL_002b: Expected O, but got Unknown + if (value != null) + { + switch ((int)value) + { + case 3: + return (object)new SolidColorBrush(Colors.Gold); + case 2: + return (object)new SolidColorBrush(Colors.Silver); + case 1: + return (object)new SolidColorBrush(Colors.SaddleBrown); + } + } + Color val = default(Color); + ((Color)(ref val)).A = 64; + ((Color)(ref val)).R = 200; + ((Color)(ref val)).G = 200; + ((Color)(ref val)).B = 200; + return (object)new SolidColorBrush(val); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return value; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/IntToMedalTextConverter.cs b/Decompiler/Gestor.Application.Converters/IntToMedalTextConverter.cs new file mode 100644 index 0000000..7121baf --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/IntToMedalTextConverter.cs @@ -0,0 +1,36 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class IntToMedalTextConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value != null) + { + switch ((int)value) + { + case 3: + return "OURO"; + case 2: + return "PRATA"; + case 1: + return "BRONZE"; + } + } + return "SEM QUALIFICAÇÃO"; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return value; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/IntToVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/IntToVisibilityConverter.cs new file mode 100644 index 0000000..f0954e4 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/IntToVisibilityConverter.cs @@ -0,0 +1,29 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class IntToVisibilityConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null || (int.TryParse(value.ToString(), out var result) && result == 0)) + { + return (object)(Visibility)2; + } + return (object)(Visibility)0; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return value; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/InvertedBoolToGridHeightOneStarConverter.cs b/Decompiler/Gestor.Application.Converters/InvertedBoolToGridHeightOneStarConverter.cs new file mode 100644 index 0000000..aabf8f0 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/InvertedBoolToGridHeightOneStarConverter.cs @@ -0,0 +1,27 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class InvertedBoolToGridHeightOneStarConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0014: Unknown result type (might be due to invalid IL or missing references) + //IL_0025: Unknown result type (might be due to invalid IL or missing references) + return (object)((value != null && !(bool)value) ? new GridLength(1.0, (GridUnitType)2) : new GridLength(0.0)); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/IsNamedObjectVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/IsNamedObjectVisibilityConverter.cs new file mode 100644 index 0000000..a008f60 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/IsNamedObjectVisibilityConverter.cs @@ -0,0 +1,82 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Common; +using Gestor.Model.Domain.Seguros; + +namespace Gestor.Application.Converters; + +public class IsNamedObjectVisibilityConverter : MarkupExtension, IValueConverter +{ + private static int column; + + private static TipoTela tela; + + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0001: Unknown result type (might be due to invalid IL or missing references) + //IL_0007: Expected O, but got Unknown + //IL_0008: Unknown result type (might be due to invalid IL or missing references) + //IL_000a: Unknown result type (might be due to invalid IL or missing references) + //IL_000f: Unknown result type (might be due to invalid IL or missing references) + //IL_0028: Unknown result type (might be due to invalid IL or missing references) + //IL_002d: Unknown result type (might be due to invalid IL or missing references) + //IL_002e: Unknown result type (might be due to invalid IL or missing references) + //IL_0031: Invalid comparison between Unknown and I4 + //IL_0017: Unknown result type (might be due to invalid IL or missing references) + //IL_001c: Unknown result type (might be due to invalid IL or missing references) + //IL_0033: Unknown result type (might be due to invalid IL or missing references) + //IL_0036: Unknown result type (might be due to invalid IL or missing references) + //IL_0038: Invalid comparison between Unknown and I4 + //IL_006b: Unknown result type (might be due to invalid IL or missing references) + //IL_005e: Unknown result type (might be due to invalid IL or missing references) + //IL_003a: Unknown result type (might be due to invalid IL or missing references) + //IL_003d: Invalid comparison between Unknown and I4 + //IL_0052: Unknown result type (might be due to invalid IL or missing references) + PermissaoUsuario val = (PermissaoUsuario)value; + Visibility val2 = (Visibility)0; + if (val.Tela != tela) + { + tela = val.Tela; + column = 1; + } + TipoTela val3 = val.Tela; + if ((int)val3 == 10) + { + goto IL_0055; + } + if (val3 - 12 > 1) + { + if ((int)val3 == 18) + { + goto IL_0055; + } + } + else if (column == 1 || column == 3) + { + val2 = (Visibility)1; + } + goto IL_005f; + IL_0055: + if (column == 3) + { + val2 = (Visibility)1; + } + goto IL_005f; + IL_005f: + column++; + return val2; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/ManutencaoPagamentoGroupHeaderConverter.cs b/Decompiler/Gestor.Application.Converters/ManutencaoPagamentoGroupHeaderConverter.cs new file mode 100644 index 0000000..a63b746 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/ManutencaoPagamentoGroupHeaderConverter.cs @@ -0,0 +1,37 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Domain.Ferramentas; + +namespace Gestor.Application.Converters; + +public class ManutencaoPagamentoGroupHeaderConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_001a: Unknown result type (might be due to invalid IL or missing references) + //IL_0020: Expected O, but got Unknown + if (value == null || parameter == null) + { + return null; + } + if (!(parameter is string)) + { + return null; + } + string name = parameter.ToString(); + ManutencaoPagamentos val = (ManutencaoPagamentos)value; + return ((object)val).GetType().GetProperty(name).GetValue(val, null); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/MenosZeroVirgulaZeroUmConverter.cs b/Decompiler/Gestor.Application.Converters/MenosZeroVirgulaZeroUmConverter.cs new file mode 100644 index 0000000..93f75e3 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/MenosZeroVirgulaZeroUmConverter.cs @@ -0,0 +1,24 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class MenosZeroVirgulaZeroUmConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return ((decimal?)value - (decimal?)0.01m).GetValueOrDefault(); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return ((decimal?)value + (decimal?)0.01m).GetValueOrDefault(); + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/MimeIconConverter.cs b/Decompiler/Gestor.Application.Converters/MimeIconConverter.cs new file mode 100644 index 0000000..60beec5 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/MimeIconConverter.cs @@ -0,0 +1,213 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; +using ControlzEx; +using MaterialDesignThemes.Wpf; + +namespace Gestor.Application.Converters; + +public class MimeIconConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0003: Unknown result type (might be due to invalid IL or missing references) + //IL_0008: Unknown result type (might be due to invalid IL or missing references) + //IL_0013: Expected O, but got Unknown + //IL_0014: Expected O, but got Unknown + //IL_01ae: Unknown result type (might be due to invalid IL or missing references) + //IL_01b3: Unknown result type (might be due to invalid IL or missing references) + //IL_01be: Expected O, but got Unknown + //IL_01bf: Expected O, but got Unknown + //IL_0225: Unknown result type (might be due to invalid IL or missing references) + //IL_022a: Unknown result type (might be due to invalid IL or missing references) + //IL_0235: Expected O, but got Unknown + //IL_0236: Expected O, but got Unknown + //IL_01bf: Unknown result type (might be due to invalid IL or missing references) + //IL_01c4: Unknown result type (might be due to invalid IL or missing references) + //IL_01cf: Expected O, but got Unknown + //IL_01d0: Expected O, but got Unknown + //IL_01f2: Unknown result type (might be due to invalid IL or missing references) + //IL_01f7: Unknown result type (might be due to invalid IL or missing references) + //IL_0202: Expected O, but got Unknown + //IL_0203: Expected O, but got Unknown + //IL_0203: Unknown result type (might be due to invalid IL or missing references) + //IL_0208: Unknown result type (might be due to invalid IL or missing references) + //IL_0213: Expected O, but got Unknown + //IL_0214: Expected O, but got Unknown + //IL_01e1: Unknown result type (might be due to invalid IL or missing references) + //IL_01e6: Unknown result type (might be due to invalid IL or missing references) + //IL_01f1: Expected O, but got Unknown + //IL_01f2: Expected O, but got Unknown + //IL_01d0: Unknown result type (might be due to invalid IL or missing references) + //IL_01d5: Unknown result type (might be due to invalid IL or missing references) + //IL_01e0: Expected O, but got Unknown + //IL_01e1: Expected O, but got Unknown + //IL_0214: Unknown result type (might be due to invalid IL or missing references) + //IL_0219: Unknown result type (might be due to invalid IL or missing references) + //IL_0224: Expected O, but got Unknown + //IL_0225: Expected O, but got Unknown + if (value == null) + { + PackIcon val = new PackIcon(); + ((PackIconBase<PackIconKind>)val).Kind = (PackIconKind)1529; + return (object)val; + } + string text = value.ToString().ToLower(); + if (text != null) + { + int length = text.Length; + if (length != 4) + { + if (length == 5) + { + switch (text[2]) + { + case 'o': + break; + case 'l': + goto IL_0183; + case 'p': + goto IL_0192; + case 's': + if (text == ".json") + { + PackIcon val2 = new PackIcon(); + ((PackIconBase<PackIconKind>)val2).Kind = (PackIconKind)2156; + return (object)val2; + } + goto IL_01ae; + default: + goto IL_01ae; + } + if (text == ".docx") + { + goto IL_01e1; + } + } + } + else + { + PackIcon val3; + switch (text[2]) + { + case 'd': + { + if (!(text == ".pdf")) + { + goto IL_01ae; + } + PackIcon val5 = new PackIcon(); + ((PackIconBase<PackIconKind>)val5).Kind = (PackIconKind)1580; + return (object)val5; + } + case 'x': + { + if (!(text == ".txt")) + { + goto IL_01ae; + } + PackIcon val4 = new PackIcon(); + ((PackIconBase<PackIconKind>)val4).Kind = (PackIconKind)3399; + return (object)val4; + } + case 'o': + break; + case 'l': + goto IL_0102; + case 'p': + goto IL_0117; + case 'n': + goto IL_012c; + case 'm': + goto IL_013e; + case 'i': + if (!(text == ".zip")) + { + goto IL_01ae; + } + goto IL_0225; + case 'a': + if (!(text == ".rar")) + { + goto IL_01ae; + } + goto IL_0225; + default: + goto IL_01ae; + IL_0225: + val3 = new PackIcon(); + ((PackIconBase<PackIconKind>)val3).Kind = (PackIconKind)301; + return (object)val3; + } + if (text == ".doc") + { + goto IL_01e1; + } + } + } + goto IL_01ae; + IL_0183: + if (!(text == ".xlsx")) + { + goto IL_01ae; + } + goto IL_01f2; + IL_0117: + if (!(text == ".jpg")) + { + goto IL_01ae; + } + goto IL_0203; + IL_0203: + PackIcon val6 = new PackIcon(); + ((PackIconBase<PackIconKind>)val6).Kind = (PackIconKind)2102; + return (object)val6; + IL_012c: + if (!(text == ".png")) + { + goto IL_01ae; + } + goto IL_0203; + IL_0192: + if (!(text == ".jpge")) + { + goto IL_01ae; + } + goto IL_0203; + IL_01e1: + PackIcon val7 = new PackIcon(); + ((PackIconBase<PackIconKind>)val7).Kind = (PackIconKind)1605; + return (object)val7; + IL_01ae: + PackIcon val8 = new PackIcon(); + ((PackIconBase<PackIconKind>)val8).Kind = (PackIconKind)1529; + return (object)val8; + IL_01f2: + PackIcon val9 = new PackIcon(); + ((PackIconBase<PackIconKind>)val9).Kind = (PackIconKind)1563; + return (object)val9; + IL_0102: + if (!(text == ".xls")) + { + goto IL_01ae; + } + goto IL_01f2; + IL_013e: + if (!(text == ".bmp")) + { + goto IL_01ae; + } + goto IL_0203; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/ModeloExisteTooltipConverter.cs b/Decompiler/Gestor.Application.Converters/ModeloExisteTooltipConverter.cs new file mode 100644 index 0000000..359e56f --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/ModeloExisteTooltipConverter.cs @@ -0,0 +1,32 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class ModeloExisteTooltipConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null) + { + return "NEM TODOS OS DOCUMENTOS SELECIONADOS\nPARA ENVIO POSSUEM AS VARIÁVEIS DESSE MODELO"; + } + if (!(bool)value) + { + return "TODOS OS DOCUMENTOS SELECIONADOS PARA\nENVIO POSSUEM AS VARIÁVEIS DESSE MODELO"; + } + return "NEM TODOS OS DOCUMENTOS SELECIONADOS\nPARA ENVIO POSSUEM AS VARIÁVEIS DESSE MODELO"; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/MultiBoolReadOnly.cs b/Decompiler/Gestor.Application.Converters/MultiBoolReadOnly.cs new file mode 100644 index 0000000..e5d3af1 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/MultiBoolReadOnly.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using System.Linq; +using System.Windows.Data; + +namespace Gestor.Application.Converters; + +public class MultiBoolReadOnly : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + return !values.All((object value) => (bool)value); + } + catch + { + return false; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } +} diff --git a/Decompiler/Gestor.Application.Converters/MultiBoolToVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/MultiBoolToVisibilityConverter.cs new file mode 100644 index 0000000..0d97cc3 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/MultiBoolToVisibilityConverter.cs @@ -0,0 +1,27 @@ +using System; +using System.Globalization; +using System.Linq; +using System.Windows; +using System.Windows.Data; + +namespace Gestor.Application.Converters; + +public class MultiBoolToVisibilityConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + return (object)(Visibility)((!values.All((object value) => (bool)value)) ? 2 : 0); + } + catch + { + return false; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } +} diff --git a/Decompiler/Gestor.Application.Converters/MultiVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/MultiVisibilityConverter.cs new file mode 100644 index 0000000..06e32a4 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/MultiVisibilityConverter.cs @@ -0,0 +1,27 @@ +using System; +using System.Globalization; +using System.Linq; +using System.Windows; +using System.Windows.Data; + +namespace Gestor.Application.Converters; + +public class MultiVisibilityConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + return (object)(Visibility)((!values.All((object value) => (int)(Visibility)value == 0)) ? 2 : 0); + } + catch + { + return false; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } +} diff --git a/Decompiler/Gestor.Application.Converters/NullToFalseConverter.cs b/Decompiler/Gestor.Application.Converters/NullToFalseConverter.cs new file mode 100644 index 0000000..28e4d64 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/NullToFalseConverter.cs @@ -0,0 +1,28 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class NullToFalseConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null) + { + return false; + } + return true; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return value; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/NullToTrueConverter.cs b/Decompiler/Gestor.Application.Converters/NullToTrueConverter.cs new file mode 100644 index 0000000..cd129a1 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/NullToTrueConverter.cs @@ -0,0 +1,32 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class NullToTrueConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null) + { + return true; + } + return (bool)value; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null) + { + return true; + } + return (bool)value; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/PackIconToImage.cs b/Decompiler/Gestor.Application.Converters/PackIconToImage.cs new file mode 100644 index 0000000..6ef2f02 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/PackIconToImage.cs @@ -0,0 +1,55 @@ +using System.Windows.Media; +using ControlzEx; +using MaterialDesignThemes.Wpf; + +namespace Gestor.Application.Converters; + +public class PackIconToImage +{ + public static ImageSource CreateImageSource(object value, Brush foregroundBrush, double penThickness) + { + //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_0026: Unknown result type (might be due to invalid IL or missing references) + //IL_0030: Expected O, but got Unknown + //IL_0018: Unknown result type (might be due to invalid IL or missing references) + //IL_0031: Expected O, but got Unknown + //IL_0031: Unknown result type (might be due to invalid IL or missing references) + //IL_0036: Unknown result type (might be due to invalid IL or missing references) + //IL_0047: Unknown result type (might be due to invalid IL or missing references) + //IL_004e: Unknown result type (might be due to invalid IL or missing references) + //IL_0051: Unknown result type (might be due to invalid IL or missing references) + //IL_005b: Expected O, but got Unknown + //IL_005c: Expected O, but got Unknown + //IL_005c: Unknown result type (might be due to invalid IL or missing references) + //IL_0061: Unknown result type (might be due to invalid IL or missing references) + //IL_006e: Expected O, but got Unknown + //IL_006e: Unknown result type (might be due to invalid IL or missing references) + //IL_0073: Unknown result type (might be due to invalid IL or missing references) + //IL_007b: Expected O, but got Unknown + _003F val; + if (!(value.GetType() == typeof(PackIconKind))) + { + val = (PackIcon)value; + } + else + { + val = new PackIcon(); + ((PackIconBase<PackIconKind>)val).Kind = (PackIconKind)value; + } + PackIcon val2 = (PackIcon)val; + GeometryDrawing val3 = new GeometryDrawing + { + Geometry = Geometry.Parse(((PackIconBase<PackIconKind>)(object)val2).Data), + Brush = foregroundBrush, + Pen = new Pen(foregroundBrush, penThickness) + }; + DrawingGroup val4 = new DrawingGroup(); + val4.Children.Add((Drawing)(object)val3); + DrawingGroup drawing = val4; + return (ImageSource)new DrawingImage + { + Drawing = (Drawing)(object)drawing + }; + } +} diff --git a/Decompiler/Gestor.Application.Converters/PackIconToImageConverter.cs b/Decompiler/Gestor.Application.Converters/PackIconToImageConverter.cs new file mode 100644 index 0000000..6e19632 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/PackIconToImageConverter.cs @@ -0,0 +1,35 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; +using System.Windows.Media; + +namespace Gestor.Application.Converters; + +public class PackIconToImageConverter : MarkupExtension, IValueConverter +{ + public double Thickness { get; set; } = 0.25; + + + public Brush Brush { get; set; } = (Brush)(object)Brushes.White; + + + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null) + { + return null; + } + return PackIconToImage.CreateImageSource(value, Brush, Thickness); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/RamoToImageConverter.cs b/Decompiler/Gestor.Application.Converters/RamoToImageConverter.cs new file mode 100644 index 0000000..ffaa08d --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/RamoToImageConverter.cs @@ -0,0 +1,135 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; +using MaterialDesignThemes.Wpf; + +namespace Gestor.Application.Converters; + +public class RamoToImageConverter : MarkupExtension, IValueConverter +{ + public double Thickness { get; set; } = 0.25; + + + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null) + { + return null; + } + long num = (long)value; + long num2 = num - 1; + if ((ulong)num2 <= 61uL) + { + switch (num2) + { + case 0L: + case 2L: + case 14L: + case 17L: + return (object)(PackIconKind)2040; + case 1L: + return (object)(PackIconKind)1515; + case 4L: + return (object)(PackIconKind)794; + case 5L: + case 8L: + case 60L: + return (object)(PackIconKind)2010; + case 6L: + case 9L: + case 11L: + case 52L: + return (object)(PackIconKind)33; + case 46L: + return (object)(PackIconKind)3465; + case 7L: + case 15L: + case 48L: + return (object)(PackIconKind)3514; + case 23L: + return (object)(PackIconKind)720; + case 10L: + case 31L: + return (object)(PackIconKind)25; + case 12L: + case 22L: + return (object)(PackIconKind)77; + case 13L: + return (object)(PackIconKind)3; + case 16L: + return (object)(PackIconKind)3012; + case 18L: + case 26L: + case 28L: + case 30L: + case 40L: + case 58L: + return (object)(PackIconKind)4; + case 19L: + return (object)(PackIconKind)3694; + case 20L: + case 21L: + case 41L: + return (object)(PackIconKind)859; + case 24L: + return (object)(PackIconKind)844; + case 25L: + return (object)(PackIconKind)1528; + case 27L: + case 55L: + return (object)(PackIconKind)3762; + case 29L: + return (object)(PackIconKind)2756; + case 32L: + case 43L: + case 53L: + return (object)(PackIconKind)3248; + case 33L: + return (object)(PackIconKind)2680; + case 34L: + return (object)(PackIconKind)1616; + case 35L: + return (object)(PackIconKind)41; + case 36L: + return (object)(PackIconKind)705; + case 37L: + return (object)(PackIconKind)920; + case 38L: + return (object)(PackIconKind)1462; + case 39L: + return (object)(PackIconKind)1013; + case 42L: + return (object)(PackIconKind)3372; + case 44L: + return (object)(PackIconKind)88; + case 45L: + return (object)(PackIconKind)3464; + case 47L: + case 56L: + return (object)(PackIconKind)870; + case 50L: + return (object)(PackIconKind)3040; + case 51L: + return (object)(PackIconKind)2433; + case 54L: + return (object)(PackIconKind)2719; + case 57L: + return (object)(PackIconKind)1101; + case 61L: + return (object)(PackIconKind)450; + } + } + return (object)(PackIconKind)196; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/ResultadoToBoolConverter.cs b/Decompiler/Gestor.Application.Converters/ResultadoToBoolConverter.cs new file mode 100644 index 0000000..93d9506 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/ResultadoToBoolConverter.cs @@ -0,0 +1,32 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Domain.Common; + +namespace Gestor.Application.Converters; + +public class ResultadoToBoolConverter : 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_0011: Expected O, but got Unknown + if (value == null) + { + return false; + } + PesquisaAvancada val = (PesquisaAvancada)value; + return val.IdCliente != 0L || val.IdDocumento != 0L || val.IdItem != 0L || val.IdSinistro != 0L || !string.IsNullOrWhiteSpace(val.Nome) || !string.IsNullOrWhiteSpace(val.Pesquisa); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return value; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/StatusComissaoAutomaticaTooltipConverter.cs b/Decompiler/Gestor.Application.Converters/StatusComissaoAutomaticaTooltipConverter.cs new file mode 100644 index 0000000..d7bf2c5 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/StatusComissaoAutomaticaTooltipConverter.cs @@ -0,0 +1,52 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class StatusComissaoAutomaticaTooltipConverter : IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_000c: Unknown result type (might be due to invalid IL or missing references) + //IL_0011: Unknown result type (might be due to invalid IL or missing references) + //IL_0012: Unknown result type (might be due to invalid IL or missing references) + //IL_0014: Unknown result type (might be due to invalid IL or missing references) + //IL_006e: Expected I4, but got Unknown + if (value is StatusParcela val) + { + return (val - 1) switch + { + 0 => "", + 1 => "CLIENTE NÃO CADASTRADO NO SISTEMA OU DIVERGÊNCIA NO NÚMERO DA APÓLICE", + 2 => "O NÚMERO DA PARCELA NÃO FOI LOCALIZADO NO SISTEMA", + 3 => "OCORRE ANTES DE BAIXAR O EXTRATO, QUANDO O PERCENTUAL DE COMISSÃO CADASTRADO NA APÓLICE É DIFERENTE DO INFORMADO NO EXTRATO", + 4 => "A PARCELA JÁ FOI BAIXADA MANUALMENTE; O SISTEMA CONFERE A DATA DE RECEBIMENTO", + 5 => "O USUÁRIO OPTOU POR NÃO REALIZAR MANUTENÇÃO", + 6 => "É NECESSÁRIO FAZER MANUTENÇÃO NAS PARCELAS ANTERIORES", + 7 => "O SISTEMA DESCONSIDERA QUANDO NÃO EXISTE VALOR DE COMISSÃO NA PARCELA", + 8 => "NÃO HÁ MANUTENÇÃO PENDENTE, APENAS REALIZAR A BAIXA", + 9 => "OCORRE APÓS A BAIXA DO EXTRATO, MESMO HAVENDO DIFERENÇA NO PERCENTUAL DE COMISSÃO", + 10 => "APÓLICES COM NÚMEROS SIMILARES LOCALIZADAS NO SISTEMA", + 11 => "INDICA QUE O EXTRATO FOI BAIXADO MANUALMENTE NO SISTEMA", + 12 => "FOI NECESSÁRIO LOCALIZAR O CLIENTE OU DOCUMENTO POR MEIO DA CRÍTICA PARA REALIZAR A BAIXA DA PARCELA", + 13 => "", + 14 => "O NÚMERO DA FATURA NÃO FOI LOCALIZADO NO SISTEMA", + 15 => "O SISTEMA TENTARÁ REALIZAR A BAIXA POR APROXIMAÇÃO, ATRAVÉS DO N° DA APÓLICE", + 16 => "HÁ PARCELA NO EXTRATO SEM VÍNCULO; IRÁ SER CRIADA AUTOMATICAMENTE", + 17 => "", + 18 => "O CAMPO DE COMISSÃO ESTÁ EM BRANCO", + 19 => "A FATURA CRIADA POSSUI O CAMPO DE COMISSÃO EM BRANCO", + 20 => "INDICA QUE A PARCELA ESPECIAL CRIADA JÁ HAVIA SIDO BAIXADA ANTERIORMENTE", + _ => "", + }; + } + return null; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return Binding.DoNothing; + } +} diff --git a/Decompiler/Gestor.Application.Converters/StatusIconConverter.cs b/Decompiler/Gestor.Application.Converters/StatusIconConverter.cs new file mode 100644 index 0000000..3d2225b --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/StatusIconConverter.cs @@ -0,0 +1,51 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Media; +using Gestor.Model.Common; +using Gestor.Model.Validation; +using MaterialDesignThemes.Wpf; + +namespace Gestor.Application.Converters; + +public class StatusIconConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + //IL_0046: Unknown result type (might be due to invalid IL or missing references) + //IL_004b: Unknown result type (might be due to invalid IL or missing references) + //IL_004c: Unknown result type (might be due to invalid IL or missing references) + //IL_004e: Unknown result type (might be due to invalid IL or missing references) + //IL_0068: Expected I4, but got Unknown + //IL_00f0: Unknown result type (might be due to invalid IL or missing references) + //IL_00f5: Unknown result type (might be due to invalid IL or missing references) + //IL_00fb: Expected O, but got Unknown + if (values[2] != null && values[2] is bool && (bool)values[2]) + { + return (object)(PackIconKind)1280; + } + object obj = values[0]; + if (obj != null) + { + if (!(obj is TipoSeguro)) + { + return (object)new SolidColorBrush(Colors.White); + } + TipoSeguro val = (TipoSeguro)values[0]; + return (val - 3) switch + { + 2 => (object)(PackIconKind)2901, + 3 => (object)(PackIconKind)1554, + 0 => (object)(PackIconKind)1058, + 4 => (object)(PackIconKind)789, + _ => (object)(PackIconKind)((values[1] == null || (DateTime?)values[1] >= Funcoes.GetNetworkTime().Date.AddDays(-6.0)) ? 1545 : 1044), + }; + } + return (object)(PackIconKind)1543; + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } +} 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; + } +} diff --git a/Decompiler/Gestor.Application.Converters/StatusPagamentoVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/StatusPagamentoVisibilityConverter.cs new file mode 100644 index 0000000..152faf7 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/StatusPagamentoVisibilityConverter.cs @@ -0,0 +1,31 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class StatusPagamentoVisibilityConverter : 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) + if (value == null) + { + return (object)(Visibility)2; + } + return (object)(Visibility)(((int)(StatusPagamento)value == 0) ? 2 : 0); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/StringToFontWeightConverter.cs b/Decompiler/Gestor.Application.Converters/StringToFontWeightConverter.cs new file mode 100644 index 0000000..9ddee88 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/StringToFontWeightConverter.cs @@ -0,0 +1,31 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class StringToFontWeightConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0015: Unknown result type (might be due to invalid IL or missing references) + //IL_0020: Unknown result type (might be due to invalid IL or missing references) + if (value == null || !((string)value).Contains("$")) + { + return FontWeights.SemiBold; + } + return FontWeights.Bold; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return value; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/StringToStringFontWeightCleanConverter.cs b/Decompiler/Gestor.Application.Converters/StringToStringFontWeightCleanConverter.cs new file mode 100644 index 0000000..989d179 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/StringToStringFontWeightCleanConverter.cs @@ -0,0 +1,28 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class StringToStringFontWeightCleanConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null || !((string)value).Contains("$")) + { + return (string)value; + } + return ((string)value).Replace("$", ""); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return value; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/SubTipoEnableConverter.cs b/Decompiler/Gestor.Application.Converters/SubTipoEnableConverter.cs new file mode 100644 index 0000000..9c4d3c9 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/SubTipoEnableConverter.cs @@ -0,0 +1,27 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class SubTipoEnableConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0004: Unknown result type (might be due to invalid IL or missing references) + //IL_000a: Invalid comparison between Unknown and I4 + return value != null && (int)(SubTipo)value != 1; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return value; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/TelaRelatorioConverter.cs b/Decompiler/Gestor.Application.Converters/TelaRelatorioConverter.cs new file mode 100644 index 0000000..a112dbe --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/TelaRelatorioConverter.cs @@ -0,0 +1,33 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using Gestor.Common.Validation; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class TelaRelatorioConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + //IL_0027: Unknown result type (might be due to invalid IL or missing references) + //IL_0013: Unknown result type (might be due to invalid IL or missing references) + try + { + if (values == null) + { + return ""; + } + return (values[0] == null) ? ValidationHelper.GetDescription((Enum)(object)(Relatorio)values[1]) : ValidationHelper.GetDescription((Enum)(object)(TipoTela)values[0]); + } + catch + { + return ""; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } +} diff --git a/Decompiler/Gestor.Application.Converters/TelefoneToVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/TelefoneToVisibilityConverter.cs new file mode 100644 index 0000000..7f228fb --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/TelefoneToVisibilityConverter.cs @@ -0,0 +1,30 @@ +using System; +using System.Globalization; +using System.Text.RegularExpressions; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class TelefoneToVisibilityConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null || (string)value == "") + { + return (object)(Visibility)0; + } + return (object)(Visibility)(Regex.Match((string)value, "^[0-9]{4} [0-9]{3} [0-9]{4}$").Success ? 2 : 0); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return value; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/TextInputToVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/TextInputToVisibilityConverter.cs new file mode 100644 index 0000000..087f3a2 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/TextInputToVisibilityConverter.cs @@ -0,0 +1,31 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; + +namespace Gestor.Application.Converters; + +public class TextInputToVisibilityConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + if (values[0] == null && values[1] is bool && (bool)values[1]) + { + return (object)(Visibility)2; + } + if (values[0] is string && values[1] is bool) + { + bool flag = !string.IsNullOrEmpty((string)values[0]); + if ((bool)values[1] || flag) + { + return (object)(Visibility)2; + } + } + return (object)(Visibility)0; + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} diff --git a/Decompiler/Gestor.Application.Converters/TipoDependenteToVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/TipoDependenteToVisibilityConverter.cs new file mode 100644 index 0000000..91e4272 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/TipoDependenteToVisibilityConverter.cs @@ -0,0 +1,32 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class TipoDependenteToVisibilityConverter : 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_0011: Invalid comparison between Unknown and I4 + if (value == null) + { + return (object)(Visibility)2; + } + return (object)(Visibility)(((int)(TipoTitular)value != 2) ? 2 : 0); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return value; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/TipoEmailVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/TipoEmailVisibilityConverter.cs new file mode 100644 index 0000000..17d3ccd --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/TipoEmailVisibilityConverter.cs @@ -0,0 +1,27 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class TipoEmailVisibilityConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0004: Unknown result type (might be due to invalid IL or missing references) + return (object)(Visibility)((value != null && (int)(TipoEmail)value != 0) ? 2 : 0); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/TipoRepasseGlobalFilterConverter.cs b/Decompiler/Gestor.Application.Converters/TipoRepasseGlobalFilterConverter.cs new file mode 100644 index 0000000..17c916c --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/TipoRepasseGlobalFilterConverter.cs @@ -0,0 +1,30 @@ +using System; +using System.Globalization; +using System.Linq; +using System.Windows.Data; +using Gestor.Application.Helpers; +using Gestor.Model.Attributes; +using Gestor.Model.Common; +using Gestor.Model.Domain.Configuracoes; + +namespace Gestor.Application.Converters; + +public class TipoRepasseGlobalFilterConverter : IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + bool ativa = Recursos.Configuracoes.Any((ConfiguracaoSistema x) => (int)x.Configuracao == 56); + return Enum.GetValues(typeof(TipoRepasse)).Cast<TipoRepasse>().Where(delegate(TipoRepasse tipo) + { + object? obj = typeof(TipoRepasse).GetField(((object)(TipoRepasse)(ref tipo)).ToString())?.GetCustomAttributes(typeof(TipoAttribute), inherit: false).FirstOrDefault(); + TipoAttribute val = (TipoAttribute)((obj is TipoAttribute) ? obj : null); + return ((val != null) ? val.Tipo : null) == "0" || (((val != null) ? val.Tipo : null) == "1" && ativa); + }) + .ToList(); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} diff --git a/Decompiler/Gestor.Application.Converters/TipoRepasseVendedorVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/TipoRepasseVendedorVisibilityConverter.cs new file mode 100644 index 0000000..f17f23b --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/TipoRepasseVendedorVisibilityConverter.cs @@ -0,0 +1,41 @@ +using System; +using System.Globalization; +using System.Linq; +using System.Windows; +using System.Windows.Data; +using Gestor.Application.Helpers; +using Gestor.Model.Domain.Configuracoes; + +namespace Gestor.Application.Converters; + +public class TipoRepasseVendedorVisibilityConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + if (parameter == null || values == null) + { + return (object)(Visibility)2; + } + string text = parameter.ToString().ToLower(); + object obj = ((values.Count() != 0) ? values[0] : ((object)false)); + switch (text) + { + default: + return (object)(Visibility)0; + case "cocorretagemtoogle": + return (object)(Visibility)((!Recursos.Configuracoes.Any((ConfiguracaoSistema config) => (int)config.Configuracao == 56)) ? 2 : 0); + case "formaincidenciabox": + case "tipovendedorbox": + case "valorrepassebox": + case "repassevendedor": + case "comissaorenovacaocombobox": + case "formarecebidabox": + return (object)(Visibility)((obj is bool && (bool)obj) ? 2 : 0); + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } +} diff --git a/Decompiler/Gestor.Application.Converters/TipoRepasseVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/TipoRepasseVisibilityConverter.cs new file mode 100644 index 0000000..c696b11 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/TipoRepasseVisibilityConverter.cs @@ -0,0 +1,59 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class TipoRepasseVisibilityConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + //IL_0010: Unknown result type (might be due to invalid IL or missing references) + //IL_0015: Unknown result type (might be due to invalid IL or missing references) + //IL_0019: Unknown result type (might be due to invalid IL or missing references) + //IL_001e: Unknown result type (might be due to invalid IL or missing references) + //IL_0080: Unknown result type (might be due to invalid IL or missing references) + //IL_0082: Invalid comparison between Unknown and I4 + //IL_008e: Unknown result type (might be due to invalid IL or missing references) + //IL_0090: Invalid comparison between Unknown and I4 + //IL_0096: Unknown result type (might be due to invalid IL or missing references) + //IL_0098: Invalid comparison between Unknown and I4 + //IL_0092: Unknown result type (might be due to invalid IL or missing references) + //IL_0094: Invalid comparison between Unknown and I4 + //IL_00ac: Unknown result type (might be due to invalid IL or missing references) + //IL_00ae: Invalid comparison between Unknown and I4 + //IL_009e: Unknown result type (might be due to invalid IL or missing references) + //IL_00a0: Invalid comparison between Unknown and I4 + //IL_009a: Unknown result type (might be due to invalid IL or missing references) + //IL_009c: Invalid comparison between Unknown and I4 + //IL_00ba: Unknown result type (might be due to invalid IL or missing references) + //IL_00bc: Invalid comparison between Unknown and I4 + //IL_00c8: Unknown result type (might be due to invalid IL or missing references) + //IL_00ca: Invalid comparison between Unknown and I4 + //IL_00d6: Unknown result type (might be due to invalid IL or missing references) + //IL_00d8: Invalid comparison between Unknown and I4 + if (parameter == null || values == null) + { + return (object)(Visibility)2; + } + TipoRepasse val = (TipoRepasse)values[0]; + FormaRepasse val2 = (FormaRepasse)values[1]; + return parameter.ToString().ToLower() switch + { + "incidenciabox" => (object)(Visibility)(((int)val != 2) ? 2 : 0), + "basepagtobox" => (object)(Visibility)(((((int)val != 1 || (int)val2 == 1) && (int)val2 != 2 && (int)val2 != 3) || (int)val == 3) ? 2 : 0), + "formapagtobox" => (object)(Visibility)(((int)val == 3) ? 2 : 0), + "valorbox" => (object)(Visibility)(((int)val == 3) ? 2 : 0), + "renovacoesbox" => (object)(Visibility)(((int)val == 3) ? 2 : 0), + "cocorretagembox" => (object)(Visibility)(((int)val != 3) ? 2 : 0), + _ => (object)(Visibility)0, + }; + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } +} diff --git a/Decompiler/Gestor.Application.Converters/TipoSinistroConverter.cs b/Decompiler/Gestor.Application.Converters/TipoSinistroConverter.cs new file mode 100644 index 0000000..13cd9ff --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/TipoSinistroConverter.cs @@ -0,0 +1,27 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class TipoSinistroConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0004: Unknown result type (might be due to invalid IL or missing references) + //IL_000a: Invalid comparison between Unknown and I4 + return value == null || (int)(TipoSinistro)value > 0; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/TipoTelefoneVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/TipoTelefoneVisibilityConverter.cs new file mode 100644 index 0000000..e12e7e7 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/TipoTelefoneVisibilityConverter.cs @@ -0,0 +1,40 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; +using Gestor.Model.Common; + +namespace Gestor.Application.Converters; + +public class TipoTelefoneVisibilityConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0004: Unknown result type (might be due to invalid IL or missing references) + //IL_000b: Invalid comparison between Unknown and I4 + //IL_000e: Unknown result type (might be due to invalid IL or missing references) + //IL_0014: Invalid comparison between Unknown and I4 + //IL_0017: Unknown result type (might be due to invalid IL or missing references) + //IL_001d: Invalid comparison between Unknown and I4 + //IL_0020: Unknown result type (might be due to invalid IL or missing references) + //IL_0026: Invalid comparison between Unknown and I4 + //IL_0029: Unknown result type (might be due to invalid IL or missing references) + //IL_002f: Invalid comparison between Unknown and I4 + if (value == null || ((int)(TipoTelefone)value != 9 && (int)(TipoTelefone)value != 3 && (int)(TipoTelefone)value != 2 && (int)(TipoTelefone)value != 5 && (int)(TipoTelefone)value != 1)) + { + return (object)(Visibility)2; + } + return (object)(Visibility)0; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/TootipStatusConverter.cs b/Decompiler/Gestor.Application.Converters/TootipStatusConverter.cs new file mode 100644 index 0000000..7010093 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/TootipStatusConverter.cs @@ -0,0 +1,59 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Media; +using Gestor.Model.Common; +using Gestor.Model.Validation; + +namespace Gestor.Application.Converters; + +public class TootipStatusConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + //IL_003c: Unknown result type (might be due to invalid IL or missing references) + //IL_0041: Unknown result type (might be due to invalid IL or missing references) + //IL_0042: Unknown result type (might be due to invalid IL or missing references) + //IL_0044: Unknown result type (might be due to invalid IL or missing references) + //IL_005e: Expected I4, but got Unknown + //IL_00cc: Unknown result type (might be due to invalid IL or missing references) + //IL_00d1: Unknown result type (might be due to invalid IL or missing references) + //IL_00d7: Expected O, but got Unknown + if (values[2] != null && values[2] is bool && (bool)values[2]) + { + return "DOCUMENTO EXCLUÍDO"; + } + object obj = values[0]; + if (obj != null) + { + if (obj is TipoSeguro) + { + TipoSeguro val = (TipoSeguro)values[0]; + switch (val - 3) + { + default: + if (values[1] != null && !((DateTime?)values[1] >= Funcoes.GetNetworkTime().Date.AddDays(-6.0))) + { + return "DOCUMENTO VENCIDO"; + } + return "DOCUMENTO VIGENTE"; + case 2: + return "DOCUMENTO RENOVADO"; + case 3: + return "DOCUMENTO PERDIDO"; + case 0: + return "DOCUMENTO CANCELADO"; + case 4: + return "DOCUMENTO RECUSADO"; + } + } + return (object)new SolidColorBrush(Colors.White); + } + return ""; + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } +} diff --git a/Decompiler/Gestor.Application.Converters/TypeVisibilityConverter.cs b/Decompiler/Gestor.Application.Converters/TypeVisibilityConverter.cs new file mode 100644 index 0000000..210a741 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/TypeVisibilityConverter.cs @@ -0,0 +1,30 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; + +namespace Gestor.Application.Converters; + +public class TypeVisibilityConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + if (values[0] == null || values[1] == null) + { + return (object)(Visibility)2; + } + return (object)(Visibility)((!((Type)values[0] == (Type)values[1])) ? 2 : 0); + } + catch (Exception) + { + return (object)(Visibility)2; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } +} diff --git a/Decompiler/Gestor.Application.Converters/ValorTipoConverter.cs b/Decompiler/Gestor.Application.Converters/ValorTipoConverter.cs new file mode 100644 index 0000000..cf2719e --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/ValorTipoConverter.cs @@ -0,0 +1,42 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class ValorTipoConverter : MarkupExtension, IMultiValueConverter +{ + object IMultiValueConverter.Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + if (values == null || values[1] == null || values[0] == DependencyProperty.UnsetValue) + { + return null; + } + if (values[0] != null) + { + string text = values[0].ToString(); + if (!(text == "VALOR")) + { + if (!(text == "PERCENTUAL")) + { + return values[1].ToString(); + } + return ((decimal)values[1]).ToString("p2"); + } + return ((decimal)values[1]).ToString("c2"); + } + return values[1].ToString(); + } + + object[] IMultiValueConverter.ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/VariavelExisteColorConverter.cs b/Decompiler/Gestor.Application.Converters/VariavelExisteColorConverter.cs new file mode 100644 index 0000000..89c1775 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/VariavelExisteColorConverter.cs @@ -0,0 +1,42 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; +using System.Windows.Media; + +namespace Gestor.Application.Converters; + +public class VariavelExisteColorConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0003: Unknown result type (might be due to invalid IL or missing references) + //IL_0008: Unknown result type (might be due to invalid IL or missing references) + //IL_000e: Expected O, but got Unknown + //IL_0021: Unknown result type (might be due to invalid IL or missing references) + //IL_0026: Unknown result type (might be due to invalid IL or missing references) + //IL_002c: Expected O, but got Unknown + //IL_0016: Unknown result type (might be due to invalid IL or missing references) + //IL_001b: Unknown result type (might be due to invalid IL or missing references) + //IL_0021: Expected O, but got Unknown + if (value != null) + { + if ((bool)value) + { + return (object)new SolidColorBrush(Colors.Red); + } + return (object)new SolidColorBrush(Colors.Black); + } + return (object)new SolidColorBrush(Colors.Red); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/VariavelExisteTooltipConverter.cs b/Decompiler/Gestor.Application.Converters/VariavelExisteTooltipConverter.cs new file mode 100644 index 0000000..45245f2 --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/VariavelExisteTooltipConverter.cs @@ -0,0 +1,32 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; + +namespace Gestor.Application.Converters; + +public class VariavelExisteTooltipConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null) + { + return "CAMPO FALTANDO EM, PELO MENOS, UM\nDOS DOCUMENTOS SELECIONADOS PARA ENVIO"; + } + if (!(bool)value) + { + return "CAMPO PRESENTE EM TODOS\nOS DOCUMENTOS SELECIONADOS PARA ENVIO"; + } + return "CAMPO FALTANDO EM, PELO MENOS, UM\nDOS DOCUMENTOS SELECIONADOS PARA ENVIO"; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} diff --git a/Decompiler/Gestor.Application.Converters/VerApoliceComissaoConverter.cs b/Decompiler/Gestor.Application.Converters/VerApoliceComissaoConverter.cs new file mode 100644 index 0000000..74eee1a --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/VerApoliceComissaoConverter.cs @@ -0,0 +1,34 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; + +namespace Gestor.Application.Converters; + +public class VerApoliceComissaoConverter : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + if (values[0] == null && values[1] == null) + { + return (object)(Visibility)2; + } + if ((long?)values[0] == 0 && (long?)values[1] == 0) + { + return (object)(Visibility)2; + } + return (object)(Visibility)0; + } + catch (Exception) + { + return (object)(Visibility)2; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } +} |