From 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 10:38:18 -0300 Subject: chore: location --- .../Converters/ActualHeightConverter.cs | 33 --- .../ArquivoDigitalVisibilityConverter.cs | 30 --- .../Converters/AssinaturasVisibilityConverter.cs | 32 --- .../Converters/AssistenciaVisibilityConverter.cs | 35 --- .../Converters/AtivoToColorConverter.cs | 35 --- .../Converters/AtivoToStringConverter.cs | 33 --- .../Converters/BaixarVisibilityConverter.cs | 41 ---- .../Converters/BoletosNotasConverter.cs | 31 --- .../Converters/BoolToGridHeightOneStarConverter.cs | 40 --- .../Converters/CalculoIconConverter.cs | 42 ---- .../Converters/ColorStatusConverter.cs | 75 ------ .../ContatoSeguradoraVisibiltyConverter.cs | 35 --- .../Converters/DesconsiderarVisibilityConverter.cs | 43 ---- .../Converters/DiasPentendesConverter.cs | 33 --- .../Converters/DocumentoEtiquetaConverter.cs | 49 ---- .../Converters/EmpresaNomeConverter.cs | 38 --- Gestor.Application/Converters/EnderecoConverter.cs | 191 --------------- .../Converters/EnviadoColorConverter.cs | 69 ------ Gestor.Application/Converters/EnviadoConverter.cs | 39 --- .../Converters/EnviadoIconConverter.cs | 65 ----- .../Converters/EnviadoTooTipConverter.cs | 67 ------ .../Converters/EqualToCollapsedConverter.cs | 47 ---- .../Converters/ExcluidoStringConverter.cs | 33 --- .../Converters/ExcluirVendedorLabelConverter.cs | 33 --- .../Converters/ExpanderHeaderConverter.cs | 41 ---- .../Converters/ExtensaoVisibilityConverter.cs | 57 ----- .../Converters/FaturaVisibilityConverter.cs | 31 --- .../Converters/FilialStringConverter.cs | 33 --- .../Converters/IdVisibilityConverter.cs | 30 --- .../Converters/IncluirApoliceEnabledConverter.cs | 37 --- .../Converters/IntToMedalConverter.cs | 55 ----- .../Converters/IntToMedalTextConverter.cs | 47 ---- .../Converters/IntToVisibilityConverter.cs | 35 --- .../InvertedBoolToGridHeightOneStarConverter.cs | 30 --- .../Converters/IsNamedObjectVisibilityConverter.cs | 77 ------ .../ManutencaoPagamentoGroupHeaderConverter.cs | 41 ---- .../Converters/MenosZeroVirgulaZeroUmConverter.cs | 57 ----- Gestor.Application/Converters/MimeIconConverter.cs | 267 --------------------- .../Converters/ModeloExisteTooltipConverter.cs | 37 --- Gestor.Application/Converters/MultiBoolReadOnly.cs | 35 --- .../Converters/MultiBoolToVisibilityConverter.cs | 36 --- .../Converters/MultiVisibilityConverter.cs | 36 --- .../Converters/NullToFalseConverter.cs | 33 --- .../Converters/NullToTrueConverter.cs | 37 --- Gestor.Application/Converters/PackIconToImage.cs | 41 ---- .../Converters/PackIconToImageConverter.cs | 39 --- .../Converters/RamoToImageConverter.cs | 214 ----------------- .../Converters/ResultadoToBoolConverter.cs | 35 --- .../StatusComissaoAutomaticaTooltipConverter.cs | 115 --------- .../Converters/StatusIconConverter.cs | 80 ------ .../Converters/StatusPagamentoColorConverter.cs | 40 --- .../StatusPagamentoVisibilityConverter.cs | 35 --- .../Converters/StringToFontWeightConverter.cs | 34 --- .../StringToStringFontWeightCleanConverter.cs | 33 --- .../Converters/SubTipoEnableConverter.cs | 30 --- .../Converters/TelaRelatorioConverter.cs | 41 ---- .../Converters/TelefoneToVisibilityConverter.cs | 35 --- .../Converters/TextInputToVisibilityConverter.cs | 36 --- .../TipoDependenteToVisibilityConverter.cs | 35 --- .../Converters/TipoEmailVisibilityConverter.cs | 31 --- .../Converters/TipoRepasseGlobalFilterConverter.cs | 41 ---- .../TipoRepasseVendedorVisibilityConverter.cs | 152 ------------ .../Converters/TipoRepasseVisibilityConverter.cs | 56 ----- .../Converters/TipoSinistroConverter.cs | 30 --- .../Converters/TipoTelefoneVisibilityConverter.cs | 35 --- .../Converters/TootipStatusConverter.cs | 75 ------ .../Converters/TypeVisibilityConverter.cs | 33 --- .../Converters/ValorTipoConverter.cs | 47 ---- .../Converters/VariavelExisteColorConverter.cs | 38 --- .../Converters/VariavelExisteTooltipConverter.cs | 37 --- .../Converters/VerApoliceComissaoConverter.cs | 52 ---- 71 files changed, 3691 deletions(-) delete mode 100644 Gestor.Application/Converters/ActualHeightConverter.cs delete mode 100644 Gestor.Application/Converters/ArquivoDigitalVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/AssinaturasVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/AssistenciaVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/AtivoToColorConverter.cs delete mode 100644 Gestor.Application/Converters/AtivoToStringConverter.cs delete mode 100644 Gestor.Application/Converters/BaixarVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/BoletosNotasConverter.cs delete mode 100644 Gestor.Application/Converters/BoolToGridHeightOneStarConverter.cs delete mode 100644 Gestor.Application/Converters/CalculoIconConverter.cs delete mode 100644 Gestor.Application/Converters/ColorStatusConverter.cs delete mode 100644 Gestor.Application/Converters/ContatoSeguradoraVisibiltyConverter.cs delete mode 100644 Gestor.Application/Converters/DesconsiderarVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/DiasPentendesConverter.cs delete mode 100644 Gestor.Application/Converters/DocumentoEtiquetaConverter.cs delete mode 100644 Gestor.Application/Converters/EmpresaNomeConverter.cs delete mode 100644 Gestor.Application/Converters/EnderecoConverter.cs delete mode 100644 Gestor.Application/Converters/EnviadoColorConverter.cs delete mode 100644 Gestor.Application/Converters/EnviadoConverter.cs delete mode 100644 Gestor.Application/Converters/EnviadoIconConverter.cs delete mode 100644 Gestor.Application/Converters/EnviadoTooTipConverter.cs delete mode 100644 Gestor.Application/Converters/EqualToCollapsedConverter.cs delete mode 100644 Gestor.Application/Converters/ExcluidoStringConverter.cs delete mode 100644 Gestor.Application/Converters/ExcluirVendedorLabelConverter.cs delete mode 100644 Gestor.Application/Converters/ExpanderHeaderConverter.cs delete mode 100644 Gestor.Application/Converters/ExtensaoVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/FaturaVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/FilialStringConverter.cs delete mode 100644 Gestor.Application/Converters/IdVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/IncluirApoliceEnabledConverter.cs delete mode 100644 Gestor.Application/Converters/IntToMedalConverter.cs delete mode 100644 Gestor.Application/Converters/IntToMedalTextConverter.cs delete mode 100644 Gestor.Application/Converters/IntToVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/InvertedBoolToGridHeightOneStarConverter.cs delete mode 100644 Gestor.Application/Converters/IsNamedObjectVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/ManutencaoPagamentoGroupHeaderConverter.cs delete mode 100644 Gestor.Application/Converters/MenosZeroVirgulaZeroUmConverter.cs delete mode 100644 Gestor.Application/Converters/MimeIconConverter.cs delete mode 100644 Gestor.Application/Converters/ModeloExisteTooltipConverter.cs delete mode 100644 Gestor.Application/Converters/MultiBoolReadOnly.cs delete mode 100644 Gestor.Application/Converters/MultiBoolToVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/MultiVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/NullToFalseConverter.cs delete mode 100644 Gestor.Application/Converters/NullToTrueConverter.cs delete mode 100644 Gestor.Application/Converters/PackIconToImage.cs delete mode 100644 Gestor.Application/Converters/PackIconToImageConverter.cs delete mode 100644 Gestor.Application/Converters/RamoToImageConverter.cs delete mode 100644 Gestor.Application/Converters/ResultadoToBoolConverter.cs delete mode 100644 Gestor.Application/Converters/StatusComissaoAutomaticaTooltipConverter.cs delete mode 100644 Gestor.Application/Converters/StatusIconConverter.cs delete mode 100644 Gestor.Application/Converters/StatusPagamentoColorConverter.cs delete mode 100644 Gestor.Application/Converters/StatusPagamentoVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/StringToFontWeightConverter.cs delete mode 100644 Gestor.Application/Converters/StringToStringFontWeightCleanConverter.cs delete mode 100644 Gestor.Application/Converters/SubTipoEnableConverter.cs delete mode 100644 Gestor.Application/Converters/TelaRelatorioConverter.cs delete mode 100644 Gestor.Application/Converters/TelefoneToVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/TextInputToVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/TipoDependenteToVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/TipoEmailVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/TipoRepasseGlobalFilterConverter.cs delete mode 100644 Gestor.Application/Converters/TipoRepasseVendedorVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/TipoRepasseVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/TipoSinistroConverter.cs delete mode 100644 Gestor.Application/Converters/TipoTelefoneVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/TootipStatusConverter.cs delete mode 100644 Gestor.Application/Converters/TypeVisibilityConverter.cs delete mode 100644 Gestor.Application/Converters/ValorTipoConverter.cs delete mode 100644 Gestor.Application/Converters/VariavelExisteColorConverter.cs delete mode 100644 Gestor.Application/Converters/VariavelExisteTooltipConverter.cs delete mode 100644 Gestor.Application/Converters/VerApoliceComissaoConverter.cs (limited to 'Gestor.Application/Converters') diff --git a/Gestor.Application/Converters/ActualHeightConverter.cs b/Gestor.Application/Converters/ActualHeightConverter.cs deleted file mode 100644 index 1d521c9..0000000 --- a/Gestor.Application/Converters/ActualHeightConverter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class ActualHeightConverter : MarkupExtension, IValueConverter - { - public ActualHeightConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null) - { - return 0; - } - return (double)value - 20; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/ArquivoDigitalVisibilityConverter.cs b/Gestor.Application/Converters/ArquivoDigitalVisibilityConverter.cs deleted file mode 100644 index 61b456a..0000000 --- a/Gestor.Application/Converters/ArquivoDigitalVisibilityConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -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 ArquivoDigitalVisibilityConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - return (value == null ? Visibility.Collapsed : Visibility.Visible); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/AssinaturasVisibilityConverter.cs b/Gestor.Application/Converters/AssinaturasVisibilityConverter.cs deleted file mode 100644 index b32db66..0000000 --- a/Gestor.Application/Converters/AssinaturasVisibilityConverter.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Windows; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class AssinaturasVisibilityConverter : MarkupExtension, IValueConverter - { - public AssinaturasVisibilityConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - return (value == null || ((List)value).Count == 0 ? Visibility.Collapsed : Visibility.Visible); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/AssistenciaVisibilityConverter.cs b/Gestor.Application/Converters/AssistenciaVisibilityConverter.cs deleted file mode 100644 index 6268f3d..0000000 --- a/Gestor.Application/Converters/AssistenciaVisibilityConverter.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class AssistenciaVisibilityConverter : MarkupExtension, IValueConverter - { - public AssistenciaVisibilityConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null) - { - return Visibility.Collapsed; - } - return ((TipoContatoSeguradora)value == 1 ? Visibility.Visible : Visibility.Collapsed); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/AtivoToColorConverter.cs b/Gestor.Application/Converters/AtivoToColorConverter.cs deleted file mode 100644 index b258583..0000000 --- a/Gestor.Application/Converters/AtivoToColorConverter.cs +++ /dev/null @@ -1,35 +0,0 @@ -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 AtivoToColorConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (((bool?)value).GetValueOrDefault(true)) - { - return new SolidColorBrush(Colors.Red); - } - return new SolidColorBrush((Color)System.Windows.Application.Current.Resources["AggerBlue"]); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/AtivoToStringConverter.cs b/Gestor.Application/Converters/AtivoToStringConverter.cs deleted file mode 100644 index f59b507..0000000 --- a/Gestor.Application/Converters/AtivoToStringConverter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class AtivoToStringConverter : MarkupExtension, IValueConverter - { - public AtivoToStringConverter() - { - } - - 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; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/BaixarVisibilityConverter.cs b/Gestor.Application/Converters/BaixarVisibilityConverter.cs deleted file mode 100644 index 7939567..0000000 --- a/Gestor.Application/Converters/BaixarVisibilityConverter.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Windows; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class BaixarVisibilityConverter : MarkupExtension, IValueConverter - { - public BaixarVisibilityConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null) - { - return Visibility.Collapsed; - } - return ((new List() - { - 1, - 13, - 10 - }).Contains((StatusParcela)value) ? Visibility.Collapsed : Visibility.Visible); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/BoletosNotasConverter.cs b/Gestor.Application/Converters/BoletosNotasConverter.cs deleted file mode 100644 index e1830a0..0000000 --- a/Gestor.Application/Converters/BoletosNotasConverter.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Gestor.Application.Model.Ajuda; -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class BoletosNotasConverter : MarkupExtension, IValueConverter - { - public BoletosNotasConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - return (string.IsNullOrEmpty(((Boleto)value).Nota) ? Visibility.Hidden : Visibility.Visible); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/BoolToGridHeightOneStarConverter.cs b/Gestor.Application/Converters/BoolToGridHeightOneStarConverter.cs deleted file mode 100644 index 636dc5e..0000000 --- a/Gestor.Application/Converters/BoolToGridHeightOneStarConverter.cs +++ /dev/null @@ -1,40 +0,0 @@ -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 BoolToGridHeightOneStarConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - int num; - int num1 = 1; - if (parameter != null && int.TryParse(parameter.ToString(), out num)) - { - num1 = num; - } - if (value != null && (bool)value && num1 == 1000) - { - return new GridLength(1, GridUnitType.Auto); - } - return (value == null || !(bool)value ? new GridLength(0) : new GridLength((double)num1, GridUnitType.Star)); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/CalculoIconConverter.cs b/Gestor.Application/Converters/CalculoIconConverter.cs deleted file mode 100644 index e7bb148..0000000 --- a/Gestor.Application/Converters/CalculoIconConverter.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Gestor.Model.Domain.Aggilizador; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class CalculoIconConverter : MarkupExtension, IValueConverter - { - public CalculoIconConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - Uri uri = new Uri("pack://application:,,,Gestor.Application;component/Assets/Images/CalculoIcon.png"); - if (value == null) - { - return uri; - } - if (!((List)value).Any((Calculo x) => x.get_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"); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return value; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/ColorStatusConverter.cs b/Gestor.Application/Converters/ColorStatusConverter.cs deleted file mode 100644 index b7cc4f9..0000000 --- a/Gestor.Application/Converters/ColorStatusConverter.cs +++ /dev/null @@ -1,75 +0,0 @@ -using Gestor.Model.Common; -using Gestor.Model.Validation; -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Media; - -namespace Gestor.Application.Converters -{ - public class ColorStatusConverter : IMultiValueConverter - { - public ColorStatusConverter() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - if (values[2] != null && values[2] is bool && (bool)values[2]) - { - return new SolidColorBrush(Colors.Red); - } - object obj = values[0]; - if (obj == null) - { - return new SolidColorBrush(Colors.White); - } - if (!(obj is TipoSeguro)) - { - return new SolidColorBrush(Colors.White); - } - switch ((TipoSeguro)values[0]) - { - case 3: - { - return new SolidColorBrush(Colors.Red); - } - case 5: - { - return new SolidColorBrush(Colors.DarkBlue); - } - case 6: - { - return new SolidColorBrush(Colors.Gray); - } - case 7: - { - return new SolidColorBrush(Colors.DimGray); - } - default: - { - if (values[1] == null) - { - return new SolidColorBrush(Colors.Green); - } - else - { - break; - } - } - } - DateTime? nullable = (DateTime?)values[1]; - DateTime dateTime = Funcoes.GetNetworkTime().Date.AddDays(-6); - if ((nullable.HasValue ? nullable.GetValueOrDefault() < dateTime : true)) - { - return new SolidColorBrush(Colors.Goldenrod); - } - return new SolidColorBrush(Colors.Green); - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - return null; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/ContatoSeguradoraVisibiltyConverter.cs b/Gestor.Application/Converters/ContatoSeguradoraVisibiltyConverter.cs deleted file mode 100644 index 4bdffcf..0000000 --- a/Gestor.Application/Converters/ContatoSeguradoraVisibiltyConverter.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class ContatoSeguradoraVisibiltyConverter : MarkupExtension, IValueConverter - { - public ContatoSeguradoraVisibiltyConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null) - { - return Visibility.Visible; - } - return ((TipoContatoSeguradora)value == 1 ? Visibility.Collapsed : Visibility.Visible); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/DesconsiderarVisibilityConverter.cs b/Gestor.Application/Converters/DesconsiderarVisibilityConverter.cs deleted file mode 100644 index 8a3c13e..0000000 --- a/Gestor.Application/Converters/DesconsiderarVisibilityConverter.cs +++ /dev/null @@ -1,43 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Windows; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class DesconsiderarVisibilityConverter : MarkupExtension, IValueConverter - { - public DesconsiderarVisibilityConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null) - { - return Visibility.Collapsed; - } - return ((new List() - { - 8, - 6, - 1, - 13, - 10 - }).Contains((StatusParcela)value) ? Visibility.Collapsed : Visibility.Visible); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/DiasPentendesConverter.cs b/Gestor.Application/Converters/DiasPentendesConverter.cs deleted file mode 100644 index c684fe8..0000000 --- a/Gestor.Application/Converters/DiasPentendesConverter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class DiasPentendesConverter : MarkupExtension, IValueConverter - { - public DiasPentendesConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null) - { - return ""; - } - return string.Format("{0} DIAS", value); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/DocumentoEtiquetaConverter.cs b/Gestor.Application/Converters/DocumentoEtiquetaConverter.cs deleted file mode 100644 index e1defd3..0000000 --- a/Gestor.Application/Converters/DocumentoEtiquetaConverter.cs +++ /dev/null @@ -1,49 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Globalization; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class DocumentoEtiquetaConverter : IMultiValueConverter - { - public DocumentoEtiquetaConverter() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - object obj; - object obj1; - try - { - if (values != null) - { - if ((TipoProtocoloEtiqueta)values[0] == 1) - { - obj1 = " - "; - } - else - { - obj1 = values[1]; - } - obj = obj1; - } - else - { - obj = ""; - } - } - catch - { - obj = ""; - } - return obj; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - return null; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/EmpresaNomeConverter.cs b/Gestor.Application/Converters/EmpresaNomeConverter.cs deleted file mode 100644 index 54ceb4c..0000000 --- a/Gestor.Application/Converters/EmpresaNomeConverter.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Gestor.Application.Helpers; -using Gestor.Model.Domain.Common; -using Gestor.Model.Domain.Generic; -using System; -using System.Globalization; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class EmpresaNomeConverter : MarkupExtension, IValueConverter - { - public EmpresaNomeConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value != null && (long)value != 0) - { - return Recursos.Empresas.First((Empresa x) => x.get_Id() == (long)value).get_Nome(); - } - return Recursos.Empresas.First((Empresa x) => x.get_Id() == (long)1).get_Nome(); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/EnderecoConverter.cs b/Gestor.Application/Converters/EnderecoConverter.cs deleted file mode 100644 index d31f10e..0000000 --- a/Gestor.Application/Converters/EnderecoConverter.cs +++ /dev/null @@ -1,191 +0,0 @@ -using Gestor.Model.Domain.Generic; -using Gestor.Model.Domain.Seguros; -using System; -using System.Collections.ObjectModel; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class EnderecoConverter : MarkupExtension, IValueConverter - { - public EnderecoConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - string str; - string str1; - string str2; - string str3; - string str4; - string str5; - string str6; - string str7; - string str8; - string str9; - string str10; - string str11; - if (value == null) - { - return ""; - } - if (!(value is ObservableCollection)) - { - return ""; - } - ObservableCollection observableCollection = (ObservableCollection)value; - if (string.IsNullOrWhiteSpace(observableCollection[0].get_Complemento())) - { - string[] strArrays = new string[11]; - string endereco = observableCollection[0].get_Endereco(); - if (endereco != null) - { - str = endereco.Trim(); - } - else - { - str = null; - } - strArrays[0] = str; - strArrays[1] = ", "; - string numero = observableCollection[0].get_Numero(); - if (numero != null) - { - str1 = numero.Trim(); - } - else - { - str1 = null; - } - strArrays[2] = str1; - strArrays[3] = ", "; - string bairro = observableCollection[0].get_Bairro(); - if (bairro != null) - { - str2 = bairro.Trim(); - } - else - { - str2 = null; - } - strArrays[4] = str2; - strArrays[5] = " - "; - string cidade = observableCollection[0].get_Cidade(); - if (cidade != null) - { - str3 = cidade.Trim(); - } - else - { - str3 = null; - } - strArrays[6] = str3; - strArrays[7] = "/"; - string estado = observableCollection[0].get_Estado(); - if (estado != null) - { - str4 = estado.Trim(); - } - else - { - str4 = null; - } - strArrays[8] = str4; - strArrays[9] = " - "; - string cep = observableCollection[0].get_Cep(); - if (cep != null) - { - str5 = cep.Trim(); - } - else - { - str5 = null; - } - strArrays[10] = str5; - return string.Concat(strArrays); - } - string[] strArrays1 = new string[13]; - string endereco1 = observableCollection[0].get_Endereco(); - if (endereco1 != null) - { - str6 = endereco1.Trim(); - } - else - { - str6 = null; - } - strArrays1[0] = str6; - strArrays1[1] = ", "; - string numero1 = observableCollection[0].get_Numero(); - if (numero1 != null) - { - str7 = numero1.Trim(); - } - else - { - str7 = null; - } - strArrays1[2] = str7; - strArrays1[3] = ", "; - strArrays1[4] = observableCollection[0].get_Complemento().Trim(); - strArrays1[5] = ", "; - string bairro1 = observableCollection[0].get_Bairro(); - if (bairro1 != null) - { - str8 = bairro1.Trim(); - } - else - { - str8 = null; - } - strArrays1[6] = str8; - strArrays1[7] = " - "; - string cidade1 = observableCollection[0].get_Cidade(); - if (cidade1 != null) - { - str9 = cidade1.Trim(); - } - else - { - str9 = null; - } - strArrays1[8] = str9; - strArrays1[9] = "/"; - string estado1 = observableCollection[0].get_Estado(); - if (estado1 != null) - { - str10 = estado1.Trim(); - } - else - { - str10 = null; - } - strArrays1[10] = str10; - strArrays1[11] = " - "; - string cep1 = observableCollection[0].get_Cep(); - if (cep1 != null) - { - str11 = cep1.Trim(); - } - else - { - str11 = null; - } - strArrays1[12] = str11; - return string.Concat(strArrays1); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/EnviadoColorConverter.cs b/Gestor.Application/Converters/EnviadoColorConverter.cs deleted file mode 100644 index 7e56ca0..0000000 --- a/Gestor.Application/Converters/EnviadoColorConverter.cs +++ /dev/null @@ -1,69 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Windows; -using System.Windows.Data; -using System.Windows.Markup; -using System.Windows.Media; - -namespace Gestor.Application.Converters -{ - public class EnviadoColorConverter : MarkupExtension, IValueConverter - { - public EnviadoColorConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null || !(value is List)) - { - return new SolidColorBrush(Colors.IndianRed); - } - List statusDocumentoAssinados = (List)value; - int num = statusDocumentoAssinados.Count((StatusDocumentoAssinado x) => { - if (x.get_Status() == 1) - { - return true; - } - return x.get_Status() == 4; - }); - int num1 = statusDocumentoAssinados.Count((StatusDocumentoAssinado x) => x.get_Status() == 0); - int num2 = statusDocumentoAssinados.Count((StatusDocumentoAssinado x) => x.get_Status() == 2); - if (statusDocumentoAssinados.All((StatusDocumentoAssinado x) => x.get_Status() == 3)) - { - return new SolidColorBrush(Colors.IndianRed); - } - if (num2 > 0) - { - return new SolidColorBrush(Colors.Red); - } - if (num > 0 && num1 == 0 && num2 == 0) - { - return new SolidColorBrush(Colors.ForestGreen); - } - if (num == 0 && num1 > 0 && num2 == 0) - { - return new SolidColorBrush((Color)System.Windows.Application.Current.Resources["AggerBlue"]); - } - if (num <= 0 || num1 <= 0 || num2 != 0) - { - return new SolidColorBrush(Colors.IndianRed); - } - return new SolidColorBrush((Color)System.Windows.Application.Current.Resources["AggerYellow100"]); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/EnviadoConverter.cs b/Gestor.Application/Converters/EnviadoConverter.cs deleted file mode 100644 index 9fe764f..0000000 --- a/Gestor.Application/Converters/EnviadoConverter.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Windows; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class EnviadoConverter : IMultiValueConverter - { - public EnviadoConverter() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - if (((IEnumerable)values).Any((object x) => x == null)) - { - return Visibility.Collapsed; - } - if (values[0] is bool && (bool)values[0]) - { - return Visibility.Collapsed; - } - if (values[1] is bool && (bool)values[1]) - { - return Visibility.Visible; - } - return Visibility.Collapsed; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/EnviadoIconConverter.cs b/Gestor.Application/Converters/EnviadoIconConverter.cs deleted file mode 100644 index a29e631..0000000 --- a/Gestor.Application/Converters/EnviadoIconConverter.cs +++ /dev/null @@ -1,65 +0,0 @@ -using ControlzEx; -using Gestor.Model.Common; -using MaterialDesignThemes.Wpf; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class EnviadoIconConverter : MarkupExtension, IValueConverter - { - public EnviadoIconConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - PackIcon packIcon = new PackIcon(); - if (value == null || !(value is List)) - { - packIcon.set_Kind(2689); - return packIcon; - } - List statusDocumentoAssinados = (List)value; - int num = statusDocumentoAssinados.Count((StatusDocumentoAssinado x) => x.get_Status() == 1); - int num1 = statusDocumentoAssinados.Count((StatusDocumentoAssinado x) => x.get_Status() == 0); - int num2 = statusDocumentoAssinados.Count((StatusDocumentoAssinado x) => x.get_Status() == 2); - if (statusDocumentoAssinados.All((StatusDocumentoAssinado x) => x.get_Status() == 3)) - { - packIcon.set_Kind(2689); - } - if (num2 > 0) - { - packIcon.set_Kind(789); - } - if (num > 0 && num1 == 0 && num2 == 0) - { - packIcon.set_Kind(2685); - } - if (num == 0 && num1 > 0 && num2 == 0) - { - packIcon.set_Kind(2685); - } - if (num > 0 && num1 > 0 && num2 == 0) - { - packIcon.set_Kind(95); - } - return packIcon; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/EnviadoTooTipConverter.cs b/Gestor.Application/Converters/EnviadoTooTipConverter.cs deleted file mode 100644 index e2f4b00..0000000 --- a/Gestor.Application/Converters/EnviadoTooTipConverter.cs +++ /dev/null @@ -1,67 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class EnviadoTooTipConverter : MarkupExtension, IValueConverter - { - public EnviadoTooTipConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null || !(value is List)) - { - return ""; - } - List statusDocumentoAssinados = (List)value; - int num = statusDocumentoAssinados.Count((StatusDocumentoAssinado x) => { - if (x.get_Status() == 1) - { - return true; - } - return x.get_Status() == 4; - }); - int num1 = statusDocumentoAssinados.Count((StatusDocumentoAssinado x) => x.get_Status() == 0); - int num2 = statusDocumentoAssinados.Count((StatusDocumentoAssinado x) => x.get_Status() == 2); - if (statusDocumentoAssinados.All((StatusDocumentoAssinado x) => x.get_Status() == 3)) - { - return "ASSINAR SELECIONADOS"; - } - if (num2 > 0) - { - return "HÁ ASSINATURAS REJEITADAS PARA ESSE DOCUMENTO"; - } - if (num > 0 && num1 == 0 && num2 == 0) - { - return "DOCUMENTO ASSINADO"; - } - if (num == 0 && num1 > 0 && num2 == 0) - { - return "ASSINATURA PENDENTE"; - } - if (num > 0 && num1 > 0 && num2 == 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; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/EqualToCollapsedConverter.cs b/Gestor.Application/Converters/EqualToCollapsedConverter.cs deleted file mode 100644 index a254e8c..0000000 --- a/Gestor.Application/Converters/EqualToCollapsedConverter.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class EqualToCollapsedConverter : IMultiValueConverter - { - public EqualToCollapsedConverter() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - Visibility visibility; - object obj = values[0]; - if (obj is long) - { - long num = (long)obj; - obj = values[1]; - if (!(obj is long)) - { - visibility = Visibility.Visible; - return visibility; - } - if (num == (long)obj) - { - visibility = Visibility.Collapsed; - return visibility; - } - else - { - visibility = Visibility.Visible; - return visibility; - } - } - visibility = Visibility.Visible; - return visibility; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - return null; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/ExcluidoStringConverter.cs b/Gestor.Application/Converters/ExcluidoStringConverter.cs deleted file mode 100644 index e02410e..0000000 --- a/Gestor.Application/Converters/ExcluidoStringConverter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class ExcluidoStringConverter : MarkupExtension, IValueConverter - { - public ExcluidoStringConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is bool && (bool)value) - { - return "EXCLUÍDO"; - } - return ""; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/ExcluirVendedorLabelConverter.cs b/Gestor.Application/Converters/ExcluirVendedorLabelConverter.cs deleted file mode 100644 index e665326..0000000 --- a/Gestor.Application/Converters/ExcluirVendedorLabelConverter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class ExcluirVendedorLabelConverter : MarkupExtension, IValueConverter - { - public ExcluirVendedorLabelConverter() - { - } - - 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; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/ExpanderHeaderConverter.cs b/Gestor.Application/Converters/ExpanderHeaderConverter.cs deleted file mode 100644 index 66c167b..0000000 --- a/Gestor.Application/Converters/ExpanderHeaderConverter.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class ExpanderHeaderConverter : MarkupExtension, IValueConverter - { - public ExpanderHeaderConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null) - { - return ""; - } - if (!(value is bool)) - { - return ""; - } - if (!(bool)value) - { - return string.Format("MOSTRAR {0}", parameter); - } - return string.Format("OCULTAR {0}", parameter); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/ExtensaoVisibilityConverter.cs b/Gestor.Application/Converters/ExtensaoVisibilityConverter.cs deleted file mode 100644 index 6114950..0000000 --- a/Gestor.Application/Converters/ExtensaoVisibilityConverter.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class ExtensaoVisibilityConverter : IMultiValueConverter - { - public ExtensaoVisibilityConverter() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - object obj; - try - { - if (values[0] == null || values[1] == null) - { - obj = Visibility.Collapsed; - } - else if (values[0] == null || (long)values[0] <= (long)0) - { - obj = (values[1].ToString().ToLower() == ".pdf" ? Visibility.Visible : Visibility.Collapsed); - } - else - { - obj = Visibility.Collapsed; - } - } - catch (Exception exception) - { - obj = Visibility.Collapsed; - } - return obj; - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null) - { - return Visibility.Collapsed; - } - if (value.ToString().ToLower() != ".pdf") - { - return Visibility.Collapsed; - } - return Visibility.Visible; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - return null; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/FaturaVisibilityConverter.cs b/Gestor.Application/Converters/FaturaVisibilityConverter.cs deleted file mode 100644 index 7bf7182..0000000 --- a/Gestor.Application/Converters/FaturaVisibilityConverter.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class FaturaVisibilityConverter : MarkupExtension, IValueConverter - { - public FaturaVisibilityConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - return (value == null || (TipoRecebimento)value != 1 ? Visibility.Visible : Visibility.Collapsed); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/FilialStringConverter.cs b/Gestor.Application/Converters/FilialStringConverter.cs deleted file mode 100644 index 587602f..0000000 --- a/Gestor.Application/Converters/FilialStringConverter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class FilialStringConverter : MarkupExtension, IValueConverter - { - public FilialStringConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is long && (long)value == (long)1) - { - return ""; - } - return string.Format("FILIAL {0}", value); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/IdVisibilityConverter.cs b/Gestor.Application/Converters/IdVisibilityConverter.cs deleted file mode 100644 index 5e30bb6..0000000 --- a/Gestor.Application/Converters/IdVisibilityConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -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 IdVisibilityConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - return (value == null || (long)value == 0 ? Visibility.Collapsed : Visibility.Visible); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/IncluirApoliceEnabledConverter.cs b/Gestor.Application/Converters/IncluirApoliceEnabledConverter.cs deleted file mode 100644 index ca7628a..0000000 --- a/Gestor.Application/Converters/IncluirApoliceEnabledConverter.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class IncluirApoliceEnabledConverter : IMultiValueConverter - { - public IncluirApoliceEnabledConverter() - { - } - - 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; - } - obj = values[1]; - if (!(obj is bool)) - { - return false; - } - return (bool)obj; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - return null; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/IntToMedalConverter.cs b/Gestor.Application/Converters/IntToMedalConverter.cs deleted file mode 100644 index f716c62..0000000 --- a/Gestor.Application/Converters/IntToMedalConverter.cs +++ /dev/null @@ -1,55 +0,0 @@ -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 IntToMedalConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value != null) - { - switch ((int)value) - { - case 1: - { - return new SolidColorBrush(Colors.SaddleBrown); - } - case 2: - { - return new SolidColorBrush(Colors.Silver); - } - case 3: - { - return new SolidColorBrush(Colors.Gold); - } - } - } - Color color = new Color() - { - A = 64, - R = 200, - G = 200, - B = 200 - }; - return new SolidColorBrush(color); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return value; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/IntToMedalTextConverter.cs b/Gestor.Application/Converters/IntToMedalTextConverter.cs deleted file mode 100644 index 71ef1a5..0000000 --- a/Gestor.Application/Converters/IntToMedalTextConverter.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class IntToMedalTextConverter : MarkupExtension, IValueConverter - { - public IntToMedalTextConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value != null) - { - switch ((int)value) - { - case 1: - { - return "BRONZE"; - } - case 2: - { - return "PRATA"; - } - case 3: - { - return "OURO"; - } - } - } - 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; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/IntToVisibilityConverter.cs b/Gestor.Application/Converters/IntToVisibilityConverter.cs deleted file mode 100644 index a09c136..0000000 --- a/Gestor.Application/Converters/IntToVisibilityConverter.cs +++ /dev/null @@ -1,35 +0,0 @@ -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 IntToVisibilityConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - int num; - if (value != null && (!int.TryParse(value.ToString(), out num) || num != 0)) - { - return Visibility.Visible; - } - return Visibility.Collapsed; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return value; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/InvertedBoolToGridHeightOneStarConverter.cs b/Gestor.Application/Converters/InvertedBoolToGridHeightOneStarConverter.cs deleted file mode 100644 index 66e7098..0000000 --- a/Gestor.Application/Converters/InvertedBoolToGridHeightOneStarConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -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 InvertedBoolToGridHeightOneStarConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - return (value == null || (bool)value ? new GridLength(0) : new GridLength(1, GridUnitType.Star)); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/IsNamedObjectVisibilityConverter.cs b/Gestor.Application/Converters/IsNamedObjectVisibilityConverter.cs deleted file mode 100644 index c5ef7b7..0000000 --- a/Gestor.Application/Converters/IsNamedObjectVisibilityConverter.cs +++ /dev/null @@ -1,77 +0,0 @@ -using Gestor.Model.Common; -using Gestor.Model.Domain.Seguros; -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class IsNamedObjectVisibilityConverter : MarkupExtension, IValueConverter - { - private static int column; - - private static TipoTela tela; - - public IsNamedObjectVisibilityConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - PermissaoUsuario permissaoUsuario = (PermissaoUsuario)value; - Visibility visibility = Visibility.Visible; - if (permissaoUsuario.get_Tela() != IsNamedObjectVisibilityConverter.tela) - { - IsNamedObjectVisibilityConverter.tela = permissaoUsuario.get_Tela(); - IsNamedObjectVisibilityConverter.column = 1; - } - TipoTela tela = permissaoUsuario.get_Tela(); - if (tela != 10) - { - if (tela - 12 > 1) - { - if (tela == 18) - { - if (IsNamedObjectVisibilityConverter.column == 3) - { - visibility = Visibility.Hidden; - } - IsNamedObjectVisibilityConverter.column++; - return visibility; - } - IsNamedObjectVisibilityConverter.column++; - return visibility; - } - else if (IsNamedObjectVisibilityConverter.column == 1 || IsNamedObjectVisibilityConverter.column == 3) - { - visibility = Visibility.Hidden; - IsNamedObjectVisibilityConverter.column++; - return visibility; - } - else - { - IsNamedObjectVisibilityConverter.column++; - return visibility; - } - } - if (IsNamedObjectVisibilityConverter.column == 3) - { - visibility = Visibility.Hidden; - } - IsNamedObjectVisibilityConverter.column++; - return visibility; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/ManutencaoPagamentoGroupHeaderConverter.cs b/Gestor.Application/Converters/ManutencaoPagamentoGroupHeaderConverter.cs deleted file mode 100644 index 107633f..0000000 --- a/Gestor.Application/Converters/ManutencaoPagamentoGroupHeaderConverter.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Gestor.Model.Domain.Ferramentas; -using System; -using System.Globalization; -using System.Reflection; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class ManutencaoPagamentoGroupHeaderConverter : MarkupExtension, IValueConverter - { - public ManutencaoPagamentoGroupHeaderConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null || parameter == null) - { - return null; - } - if (!(parameter is string)) - { - return null; - } - string str = parameter.ToString(); - ManutencaoPagamentos manutencaoPagamento = (ManutencaoPagamentos)value; - return manutencaoPagamento.GetType().GetProperty(str).GetValue(manutencaoPagamento, null); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/MenosZeroVirgulaZeroUmConverter.cs b/Gestor.Application/Converters/MenosZeroVirgulaZeroUmConverter.cs deleted file mode 100644 index f230613..0000000 --- a/Gestor.Application/Converters/MenosZeroVirgulaZeroUmConverter.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class MenosZeroVirgulaZeroUmConverter : MarkupExtension, IValueConverter - { - public MenosZeroVirgulaZeroUmConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - decimal? nullable; - decimal? nullable1; - decimal? nullable2 = (decimal?)value; - decimal num = new decimal(1, 0, 0, false, 2); - if (nullable2.HasValue) - { - nullable1 = new decimal?(nullable2.GetValueOrDefault() - num); - } - else - { - nullable = null; - nullable1 = nullable; - } - nullable = nullable1; - return nullable.GetValueOrDefault(); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - decimal? nullable; - decimal? nullable1; - decimal? nullable2 = (decimal?)value; - decimal num = new decimal(1, 0, 0, false, 2); - if (nullable2.HasValue) - { - nullable1 = new decimal?(nullable2.GetValueOrDefault() + num); - } - else - { - nullable = null; - nullable1 = nullable; - } - nullable = nullable1; - return nullable.GetValueOrDefault(); - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/MimeIconConverter.cs b/Gestor.Application/Converters/MimeIconConverter.cs deleted file mode 100644 index a3f0efd..0000000 --- a/Gestor.Application/Converters/MimeIconConverter.cs +++ /dev/null @@ -1,267 +0,0 @@ -using ControlzEx; -using MaterialDesignThemes.Wpf; -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class MimeIconConverter : MarkupExtension, IValueConverter - { - public MimeIconConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - char chr; - PackIcon packIcon; - PackIcon packIcon1; - PackIcon packIcon2; - PackIcon packIcon3; - PackIcon packIcon4; - if (value == null) - { - PackIcon packIcon5 = new PackIcon(); - packIcon5.set_Kind(1529); - return packIcon5; - } - string lower = value.ToString().ToLower(); - if (lower != null) - { - int length = lower.Length; - if (length == 4) - { - chr = lower[2]; - if (chr == 'a') - { - if (lower == ".rar") - { - packIcon1 = new PackIcon(); - packIcon1.set_Kind(301); - return packIcon1; - } - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - else - { - switch (chr) - { - case 'd': - { - if (lower == ".pdf") - { - PackIcon packIcon6 = new PackIcon(); - packIcon6.set_Kind(1580); - return packIcon6; - } - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - case 'e': - case 'f': - case 'g': - case 'h': - case 'j': - case 'k': - { - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - case 'i': - { - if (lower == ".zip") - { - break; - } - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - case 'l': - { - if (lower == ".xls") - { - packIcon2 = new PackIcon(); - packIcon2.set_Kind(1563); - return packIcon2; - } - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - case 'm': - { - if (lower == ".bmp") - { - packIcon3 = new PackIcon(); - packIcon3.set_Kind(2102); - return packIcon3; - } - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - case 'n': - { - if (lower == ".png") - { - packIcon3 = new PackIcon(); - packIcon3.set_Kind(2102); - return packIcon3; - } - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - case 'o': - { - if (lower == ".doc") - { - packIcon4 = new PackIcon(); - packIcon4.set_Kind(1605); - return packIcon4; - } - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - case 'p': - { - if (lower == ".jpg") - { - packIcon3 = new PackIcon(); - packIcon3.set_Kind(2102); - return packIcon3; - } - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - default: - { - if (chr == 'x') - { - if (lower == ".txt") - { - PackIcon packIcon7 = new PackIcon(); - packIcon7.set_Kind(3399); - return packIcon7; - } - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - else - { - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - } - } - } - packIcon1 = new PackIcon(); - packIcon1.set_Kind(301); - return packIcon1; - } - else if (length == 5) - { - chr = lower[2]; - switch (chr) - { - case 'l': - { - if (lower == ".xlsx") - { - packIcon2 = new PackIcon(); - packIcon2.set_Kind(1563); - return packIcon2; - } - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - case 'm': - case 'n': - { - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - case 'o': - { - if (lower == ".docx") - { - packIcon4 = new PackIcon(); - packIcon4.set_Kind(1605); - return packIcon4; - } - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - case 'p': - { - if (lower == ".jpge") - { - break; - } - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - default: - { - if (chr == 's') - { - if (lower != ".json") - { - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - PackIcon packIcon8 = new PackIcon(); - packIcon8.set_Kind(2156); - return packIcon8; - } - else - { - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - } - } - } - else - { - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - packIcon3 = new PackIcon(); - packIcon3.set_Kind(2102); - return packIcon3; - } - packIcon = new PackIcon(); - packIcon.set_Kind(1529); - return packIcon; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/ModeloExisteTooltipConverter.cs b/Gestor.Application/Converters/ModeloExisteTooltipConverter.cs deleted file mode 100644 index 01d12cb..0000000 --- a/Gestor.Application/Converters/ModeloExisteTooltipConverter.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class ModeloExisteTooltipConverter : MarkupExtension, IValueConverter - { - public ModeloExisteTooltipConverter() - { - } - - 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; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/MultiBoolReadOnly.cs b/Gestor.Application/Converters/MultiBoolReadOnly.cs deleted file mode 100644 index 3bd7f40..0000000 --- a/Gestor.Application/Converters/MultiBoolReadOnly.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class MultiBoolReadOnly : IMultiValueConverter - { - public MultiBoolReadOnly() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - object obj; - try - { - obj = !((IEnumerable)values).All((object value) => (bool)value); - } - catch - { - obj = false; - } - return obj; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - return null; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/MultiBoolToVisibilityConverter.cs b/Gestor.Application/Converters/MultiBoolToVisibilityConverter.cs deleted file mode 100644 index 710de71..0000000 --- a/Gestor.Application/Converters/MultiBoolToVisibilityConverter.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Windows; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class MultiBoolToVisibilityConverter : IMultiValueConverter - { - public MultiBoolToVisibilityConverter() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - object obj; - try - { - obj = (((IEnumerable)values).All((object value) => (bool)value) ? Visibility.Visible : Visibility.Collapsed); - } - catch - { - obj = false; - } - return obj; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - return null; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/MultiVisibilityConverter.cs b/Gestor.Application/Converters/MultiVisibilityConverter.cs deleted file mode 100644 index 1e5f09b..0000000 --- a/Gestor.Application/Converters/MultiVisibilityConverter.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Windows; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class MultiVisibilityConverter : IMultiValueConverter - { - public MultiVisibilityConverter() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - object obj; - try - { - obj = (((IEnumerable)values).All((object value) => (Visibility)value == Visibility.Visible) ? Visibility.Visible : Visibility.Collapsed); - } - catch - { - obj = false; - } - return obj; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - return null; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/NullToFalseConverter.cs b/Gestor.Application/Converters/NullToFalseConverter.cs deleted file mode 100644 index 23186f6..0000000 --- a/Gestor.Application/Converters/NullToFalseConverter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class NullToFalseConverter : MarkupExtension, IValueConverter - { - public NullToFalseConverter() - { - } - - 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; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/NullToTrueConverter.cs b/Gestor.Application/Converters/NullToTrueConverter.cs deleted file mode 100644 index c75c2d5..0000000 --- a/Gestor.Application/Converters/NullToTrueConverter.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class NullToTrueConverter : MarkupExtension, IValueConverter - { - public NullToTrueConverter() - { - } - - 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; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/PackIconToImage.cs b/Gestor.Application/Converters/PackIconToImage.cs deleted file mode 100644 index ffccc97..0000000 --- a/Gestor.Application/Converters/PackIconToImage.cs +++ /dev/null @@ -1,41 +0,0 @@ -using ControlzEx; -using MaterialDesignThemes.Wpf; -using System; -using System.Windows.Media; - -namespace Gestor.Application.Converters -{ - public class PackIconToImage - { - public PackIconToImage() - { - } - - public static ImageSource CreateImageSource(object value, Brush foregroundBrush, double penThickness) - { - PackIcon packIcon; - if (value.GetType() == typeof(PackIconKind)) - { - packIcon = new PackIcon(); - packIcon.set_Kind((PackIconKind)value); - } - else - { - packIcon = (PackIcon)value; - } - PackIcon packIcon1 = packIcon; - GeometryDrawing geometryDrawing = new GeometryDrawing() - { - Geometry = Geometry.Parse(packIcon1.get_Data()), - Brush = foregroundBrush, - Pen = new Pen(foregroundBrush, penThickness) - }; - DrawingGroup drawingGroup = new DrawingGroup(); - drawingGroup.Children.Add(geometryDrawing); - return new DrawingImage() - { - Drawing = drawingGroup - }; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/PackIconToImageConverter.cs b/Gestor.Application/Converters/PackIconToImageConverter.cs deleted file mode 100644 index 4ded51c..0000000 --- a/Gestor.Application/Converters/PackIconToImageConverter.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Globalization; -using System.Runtime.CompilerServices; -using System.Windows.Data; -using System.Windows.Markup; -using System.Windows.Media; - -namespace Gestor.Application.Converters -{ - public class PackIconToImageConverter : MarkupExtension, IValueConverter - { - public System.Windows.Media.Brush Brush { get; set; } = Brushes.White; - - public double Thickness { get; set; } = 0.25; - - public PackIconToImageConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null) - { - return null; - } - return PackIconToImage.CreateImageSource(value, this.Brush, this.Thickness); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/RamoToImageConverter.cs b/Gestor.Application/Converters/RamoToImageConverter.cs deleted file mode 100644 index 1fca8b2..0000000 --- a/Gestor.Application/Converters/RamoToImageConverter.cs +++ /dev/null @@ -1,214 +0,0 @@ -using MaterialDesignThemes.Wpf; -using System; -using System.Globalization; -using System.Runtime.CompilerServices; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class RamoToImageConverter : MarkupExtension, IValueConverter - { - public double Thickness { get; set; } = 0.25; - - public RamoToImageConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null) - { - return null; - } - long num = (long)value - (long)1; - if (num <= (long)61) - { - switch ((uint)num) - { - case 0: - case 2: - case 14: - case 17: - { - return (PackIconKind)2040; - } - case 1: - { - return (PackIconKind)1515; - } - case 4: - { - return (PackIconKind)794; - } - case 5: - case 8: - case 60: - { - return (PackIconKind)2010; - } - case 6: - case 9: - case 11: - case 52: - { - return (PackIconKind)33; - } - case 7: - case 15: - case 48: - { - return (PackIconKind)3514; - } - case 10: - case 31: - { - return (PackIconKind)25; - } - case 12: - case 22: - { - return (PackIconKind)77; - } - case 13: - { - return (PackIconKind)3; - } - case 16: - { - return (PackIconKind)3012; - } - case 18: - case 26: - case 28: - case 30: - case 40: - case 58: - { - return (PackIconKind)4; - } - case 19: - { - return (PackIconKind)3694; - } - case 20: - case 21: - case 41: - { - return (PackIconKind)859; - } - case 23: - { - return (PackIconKind)720; - } - case 24: - { - return (PackIconKind)844; - } - case 25: - { - return (PackIconKind)1528; - } - case 27: - case 55: - { - return (PackIconKind)3762; - } - case 29: - { - return (PackIconKind)2756; - } - case 32: - case 43: - case 53: - { - return (PackIconKind)3248; - } - case 33: - { - return (PackIconKind)2680; - } - case 34: - { - return (PackIconKind)1616; - } - case 35: - { - return (PackIconKind)41; - } - case 36: - { - return (PackIconKind)705; - } - case 37: - { - return (PackIconKind)920; - } - case 38: - { - return (PackIconKind)1462; - } - case 39: - { - return (PackIconKind)1013; - } - case 42: - { - return (PackIconKind)3372; - } - case 44: - { - return (PackIconKind)88; - } - case 45: - { - return (PackIconKind)3464; - } - case 46: - { - return (PackIconKind)3465; - } - case 47: - case 56: - { - return (PackIconKind)870; - } - case 50: - { - return (PackIconKind)3040; - } - case 51: - { - return (PackIconKind)2433; - } - case 54: - { - return (PackIconKind)2719; - } - case 57: - { - return (PackIconKind)1101; - } - case 61: - { - return (PackIconKind)450; - } - } - } - else - { - } - return (PackIconKind)196; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/ResultadoToBoolConverter.cs b/Gestor.Application/Converters/ResultadoToBoolConverter.cs deleted file mode 100644 index 4f25d95..0000000 --- a/Gestor.Application/Converters/ResultadoToBoolConverter.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Gestor.Model.Domain.Common; -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class ResultadoToBoolConverter : MarkupExtension, IValueConverter - { - public ResultadoToBoolConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null) - { - return false; - } - PesquisaAvancada pesquisaAvancada = (PesquisaAvancada)value; - return (pesquisaAvancada.get_IdCliente() != 0 || pesquisaAvancada.get_IdDocumento() != 0 || pesquisaAvancada.get_IdItem() != 0 || pesquisaAvancada.get_IdSinistro() != 0 || !string.IsNullOrWhiteSpace(pesquisaAvancada.get_Nome()) ? true : !string.IsNullOrWhiteSpace(pesquisaAvancada.get_Pesquisa())); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return value; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/StatusComissaoAutomaticaTooltipConverter.cs b/Gestor.Application/Converters/StatusComissaoAutomaticaTooltipConverter.cs deleted file mode 100644 index 67b2207..0000000 --- a/Gestor.Application/Converters/StatusComissaoAutomaticaTooltipConverter.cs +++ /dev/null @@ -1,115 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Globalization; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class StatusComissaoAutomaticaTooltipConverter : IValueConverter - { - public StatusComissaoAutomaticaTooltipConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (!(value is StatusParcela)) - { - return null; - } - switch ((StatusParcela)value) - { - case 1: - { - return ""; - } - case 2: - { - return "CLIENTE NÃO CADASTRADO NO SISTEMA OU DIVERGÊNCIA NO NÚMERO DA APÓLICE"; - } - case 3: - { - return "O NÚMERO DA PARCELA NÃO FOI LOCALIZADO NO SISTEMA"; - } - case 4: - { - return "OCORRE ANTES DE BAIXAR O EXTRATO, QUANDO O PERCENTUAL DE COMISSÃO CADASTRADO NA APÓLICE É DIFERENTE DO INFORMADO NO EXTRATO"; - } - case 5: - { - return "A PARCELA JÁ FOI BAIXADA MANUALMENTE; O SISTEMA CONFERE A DATA DE RECEBIMENTO"; - } - case 6: - { - return "O USUÁRIO OPTOU POR NÃO REALIZAR MANUTENÇÃO"; - } - case 7: - { - return "É NECESSÁRIO FAZER MANUTENÇÃO NAS PARCELAS ANTERIORES"; - } - case 8: - { - return "O SISTEMA DESCONSIDERA QUANDO NÃO EXISTE VALOR DE COMISSÃO NA PARCELA"; - } - case 9: - { - return "NÃO HÁ MANUTENÇÃO PENDENTE, APENAS REALIZAR A BAIXA"; - } - case 10: - { - return "OCORRE APÓS A BAIXA DO EXTRATO, MESMO HAVENDO DIFERENÇA NO PERCENTUAL DE COMISSÃO"; - } - case 11: - { - return "APÓLICES COM NÚMEROS SIMILARES LOCALIZADAS NO SISTEMA"; - } - case 12: - { - return "INDICA QUE O EXTRATO FOI BAIXADO MANUALMENTE NO SISTEMA"; - } - case 13: - { - return "FOI NECESSÁRIO LOCALIZAR O CLIENTE OU DOCUMENTO POR MEIO DA CRÍTICA PARA REALIZAR A BAIXA DA PARCELA"; - } - case 14: - { - return ""; - } - case 15: - { - return "O NÚMERO DA FATURA NÃO FOI LOCALIZADO NO SISTEMA"; - } - case 16: - { - return "O SISTEMA TENTARÁ REALIZAR A BAIXA POR APROXIMAÇÃO, ATRAVÉS DO N° DA APÓLICE"; - } - case 17: - { - return "HÁ PARCELA NO EXTRATO SEM VÍNCULO; IRÁ SER CRIADA AUTOMATICAMENTE"; - } - case 18: - { - return ""; - } - case 19: - { - return "O CAMPO DE COMISSÃO ESTÁ EM BRANCO"; - } - case 20: - { - return "A FATURA CRIADA POSSUI O CAMPO DE COMISSÃO EM BRANCO"; - } - case 21: - { - return "INDICA QUE A PARCELA ESPECIAL CRIADA JÁ HAVIA SIDO BAIXADA ANTERIORMENTE"; - } - } - return ""; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return Binding.DoNothing; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/StatusIconConverter.cs b/Gestor.Application/Converters/StatusIconConverter.cs deleted file mode 100644 index 9717cea..0000000 --- a/Gestor.Application/Converters/StatusIconConverter.cs +++ /dev/null @@ -1,80 +0,0 @@ -using Gestor.Model.Common; -using Gestor.Model.Validation; -using MaterialDesignThemes.Wpf; -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Media; - -namespace Gestor.Application.Converters -{ - public class StatusIconConverter : IMultiValueConverter - { - public StatusIconConverter() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - PackIconKind packIconKind; - if (values[2] != null && values[2] is bool && (bool)values[2]) - { - return (PackIconKind)1280; - } - object obj = values[0]; - if (obj == null) - { - return (PackIconKind)1543; - } - if (!(obj is TipoSeguro)) - { - return new SolidColorBrush(Colors.White); - } - switch ((TipoSeguro)values[0]) - { - case 3: - { - return (PackIconKind)1058; - } - case 5: - { - return (PackIconKind)2901; - } - case 6: - { - return (PackIconKind)1554; - } - case 7: - { - return (PackIconKind)789; - } - default: - { - if (values[1] == null) - { - packIconKind = 1545; - return packIconKind; - } - else - { - break; - } - } - } - DateTime? nullable = (DateTime?)values[1]; - DateTime dateTime = Funcoes.GetNetworkTime().Date.AddDays(-6); - if ((nullable.HasValue ? nullable.GetValueOrDefault() < dateTime : true)) - { - packIconKind = 1044; - return packIconKind; - } - packIconKind = 1545; - return packIconKind; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - return null; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/StatusPagamentoColorConverter.cs b/Gestor.Application/Converters/StatusPagamentoColorConverter.cs deleted file mode 100644 index 92ab9ba..0000000 --- a/Gestor.Application/Converters/StatusPagamentoColorConverter.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Gestor.Model.Common; -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 StatusPagamentoColorConverter : MarkupExtension, IValueConverter - { - public StatusPagamentoColorConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null || (StatusPagamento)value == null) - { - return new SolidColorBrush(Colors.Gray); - } - if ((StatusPagamento)value != 2) - { - return new SolidColorBrush(Colors.Red); - } - return new SolidColorBrush((Color)System.Windows.Application.Current.Resources["AggerBlue"]); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/StatusPagamentoVisibilityConverter.cs b/Gestor.Application/Converters/StatusPagamentoVisibilityConverter.cs deleted file mode 100644 index 7b17fdd..0000000 --- a/Gestor.Application/Converters/StatusPagamentoVisibilityConverter.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class StatusPagamentoVisibilityConverter : MarkupExtension, IValueConverter - { - public StatusPagamentoVisibilityConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null) - { - return Visibility.Collapsed; - } - return ((StatusPagamento)value == null ? Visibility.Collapsed : Visibility.Visible); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/StringToFontWeightConverter.cs b/Gestor.Application/Converters/StringToFontWeightConverter.cs deleted file mode 100644 index 40ca721..0000000 --- a/Gestor.Application/Converters/StringToFontWeightConverter.cs +++ /dev/null @@ -1,34 +0,0 @@ -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 StringToFontWeightConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value != null && ((string)value).Contains("$")) - { - return FontWeights.Bold; - } - return FontWeights.SemiBold; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return value; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/StringToStringFontWeightCleanConverter.cs b/Gestor.Application/Converters/StringToStringFontWeightCleanConverter.cs deleted file mode 100644 index c738ba9..0000000 --- a/Gestor.Application/Converters/StringToStringFontWeightCleanConverter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class StringToStringFontWeightCleanConverter : MarkupExtension, IValueConverter - { - public StringToStringFontWeightCleanConverter() - { - } - - 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; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/SubTipoEnableConverter.cs b/Gestor.Application/Converters/SubTipoEnableConverter.cs deleted file mode 100644 index 53d4698..0000000 --- a/Gestor.Application/Converters/SubTipoEnableConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class SubTipoEnableConverter : MarkupExtension, IValueConverter - { - public SubTipoEnableConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - return (value == null ? false : (SubTipo)value != 1); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return value; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/TelaRelatorioConverter.cs b/Gestor.Application/Converters/TelaRelatorioConverter.cs deleted file mode 100644 index 0104b98..0000000 --- a/Gestor.Application/Converters/TelaRelatorioConverter.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Gestor.Common.Validation; -using Gestor.Model.Common; -using System; -using System.Globalization; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class TelaRelatorioConverter : IMultiValueConverter - { - public TelaRelatorioConverter() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - object obj; - try - { - if (values != null) - { - obj = (values[0] == null ? ValidationHelper.GetDescription((Relatorio)values[1]) : ValidationHelper.GetDescription((TipoTela)values[0])); - } - else - { - obj = ""; - } - } - catch - { - obj = ""; - } - return obj; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - return null; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/TelefoneToVisibilityConverter.cs b/Gestor.Application/Converters/TelefoneToVisibilityConverter.cs deleted file mode 100644 index 5eeca33..0000000 --- a/Gestor.Application/Converters/TelefoneToVisibilityConverter.cs +++ /dev/null @@ -1,35 +0,0 @@ -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 TelefoneToVisibilityConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null || (string)value == "") - { - return Visibility.Visible; - } - return (Regex.Match((string)value, "^[0-9]{4} [0-9]{3} [0-9]{4}$").Success ? Visibility.Collapsed : Visibility.Visible); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return value; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/TextInputToVisibilityConverter.cs b/Gestor.Application/Converters/TextInputToVisibilityConverter.cs deleted file mode 100644 index 820e24a..0000000 --- a/Gestor.Application/Converters/TextInputToVisibilityConverter.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class TextInputToVisibilityConverter : IMultiValueConverter - { - public TextInputToVisibilityConverter() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - if (values[0] == null && values[1] is bool && (bool)values[1]) - { - return Visibility.Collapsed; - } - if (values[0] is string && values[1] is bool) - { - bool flag = !string.IsNullOrEmpty((string)values[0]); - if ((bool)values[1] | flag) - { - return Visibility.Collapsed; - } - } - return Visibility.Visible; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/TipoDependenteToVisibilityConverter.cs b/Gestor.Application/Converters/TipoDependenteToVisibilityConverter.cs deleted file mode 100644 index 3039f18..0000000 --- a/Gestor.Application/Converters/TipoDependenteToVisibilityConverter.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class TipoDependenteToVisibilityConverter : MarkupExtension, IValueConverter - { - public TipoDependenteToVisibilityConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null) - { - return Visibility.Collapsed; - } - return ((TipoTitular)value == 2 ? Visibility.Visible : Visibility.Collapsed); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return value; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/TipoEmailVisibilityConverter.cs b/Gestor.Application/Converters/TipoEmailVisibilityConverter.cs deleted file mode 100644 index b382d5e..0000000 --- a/Gestor.Application/Converters/TipoEmailVisibilityConverter.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class TipoEmailVisibilityConverter : MarkupExtension, IValueConverter - { - public TipoEmailVisibilityConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - return (value == null || (TipoEmail)value == null ? Visibility.Visible : Visibility.Collapsed); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/TipoRepasseGlobalFilterConverter.cs b/Gestor.Application/Converters/TipoRepasseGlobalFilterConverter.cs deleted file mode 100644 index 37e73c5..0000000 --- a/Gestor.Application/Converters/TipoRepasseGlobalFilterConverter.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Gestor.Application.Helpers; -using Gestor.Model.Attributes; -using Gestor.Model.Common; -using Gestor.Model.Domain.Configuracoes; -using System; -using System.Globalization; -using System.Linq; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class TipoRepasseGlobalFilterConverter : IValueConverter - { - public TipoRepasseGlobalFilterConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - bool flag = Recursos.Configuracoes.Any((ConfiguracaoSistema x) => x.get_Configuracao() == 56); - return Enum.GetValues(typeof(TipoRepasse)).Cast().Where((TipoRepasse tipo) => { - object obj; - FieldInfo field = typeof(TipoRepasse).GetField(tipo.ToString()); - obj = (field != null ? field.GetCustomAttributes(typeof(TipoAttribute), false).FirstOrDefault() : null); - TipoAttribute tipoAttribute = obj as TipoAttribute; - if ((tipoAttribute != null ? tipoAttribute.get_Tipo() : null) == "0") - { - return true; - } - return ((tipoAttribute != null ? tipoAttribute.get_Tipo() : null) == "1") & flag; - }).ToList(); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/TipoRepasseVendedorVisibilityConverter.cs b/Gestor.Application/Converters/TipoRepasseVendedorVisibilityConverter.cs deleted file mode 100644 index fc9fc1c..0000000 --- a/Gestor.Application/Converters/TipoRepasseVendedorVisibilityConverter.cs +++ /dev/null @@ -1,152 +0,0 @@ -using Gestor.Application.Helpers; -using Gestor.Model.Domain.Configuracoes; -using System; -using System.Globalization; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Windows; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class TipoRepasseVendedorVisibilityConverter : IMultiValueConverter - { - public TipoRepasseVendedorVisibilityConverter() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - char chr; - object obj; - Visibility visibility; - if (parameter == null || values == null) - { - return Visibility.Collapsed; - } - string lower = parameter.ToString().ToLower(); - if (values.Count() != 0) - { - obj = values[0]; - } - else - { - obj = false; - } - object obj1 = obj; - if (lower != null) - { - int length = lower.Length; - switch (length) - { - case 15: - { - chr = lower[0]; - switch (chr) - { - case 'r': - { - if (lower == "repassevendedor") - { - visibility = (!(obj1 is bool) || !(bool)obj1 ? Visibility.Visible : Visibility.Collapsed); - return visibility; - } - return Visibility.Visible; - } - case 's': - case 'u': - { - return Visibility.Visible; - } - case 't': - { - if (lower == "tipovendedorbox") - { - visibility = (!(obj1 is bool) || !(bool)obj1 ? Visibility.Visible : Visibility.Collapsed); - return visibility; - } - return Visibility.Visible; - } - case 'v': - { - if (lower == "valorrepassebox") - { - visibility = (!(obj1 is bool) || !(bool)obj1 ? Visibility.Visible : Visibility.Collapsed); - return visibility; - } - return Visibility.Visible; - } - default: - { - return Visibility.Visible; - } - } - break; - } - case 16: - { - if (lower == "formarecebidabox") - { - break; - } - else - { - return Visibility.Visible; - } - } - case 17: - { - return Visibility.Visible; - } - case 18: - { - chr = lower[0]; - if (chr == 'c') - { - if (lower == "cocorretagemtoogle") - { - return (Recursos.Configuracoes.Any((ConfiguracaoSistema config) => config.get_Configuracao() == 56) ? Visibility.Visible : Visibility.Collapsed); - } - return Visibility.Visible; - } - else if (chr == 'f') - { - if (lower == "formaincidenciabox") - { - break; - } - return Visibility.Visible; - } - else - { - return Visibility.Visible; - } - } - default: - { - if (length == 25) - { - if (lower == "comissaorenovacaocombobox") - { - break; - } - return Visibility.Visible; - } - else - { - return Visibility.Visible; - } - } - } - visibility = (!(obj1 is bool) || !(bool)obj1 ? Visibility.Visible : Visibility.Collapsed); - return visibility; - } - return Visibility.Visible; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - return null; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/TipoRepasseVisibilityConverter.cs b/Gestor.Application/Converters/TipoRepasseVisibilityConverter.cs deleted file mode 100644 index 4df37ee..0000000 --- a/Gestor.Application/Converters/TipoRepasseVisibilityConverter.cs +++ /dev/null @@ -1,56 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class TipoRepasseVisibilityConverter : IMultiValueConverter - { - public TipoRepasseVisibilityConverter() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - if (parameter == null || values == null) - { - return Visibility.Collapsed; - } - TipoRepasse tipoRepasse = (TipoRepasse)values[0]; - FormaRepasse formaRepasse = (FormaRepasse)values[1]; - string lower = parameter.ToString().ToLower(); - if (lower == "incidenciabox") - { - return (tipoRepasse == 2 ? Visibility.Visible : Visibility.Collapsed); - } - if (lower == "basepagtobox") - { - return ((tipoRepasse != 1 || formaRepasse == 1) && formaRepasse != 2 && formaRepasse != 3 || tipoRepasse == 3 ? Visibility.Collapsed : Visibility.Visible); - } - if (lower == "formapagtobox") - { - return (tipoRepasse == 3 ? Visibility.Collapsed : Visibility.Visible); - } - if (lower == "valorbox") - { - return (tipoRepasse == 3 ? Visibility.Collapsed : Visibility.Visible); - } - if (lower == "renovacoesbox") - { - return (tipoRepasse == 3 ? Visibility.Collapsed : Visibility.Visible); - } - if (lower != "cocorretagembox") - { - return Visibility.Visible; - } - return (tipoRepasse == 3 ? Visibility.Visible : Visibility.Collapsed); - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - return null; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/TipoSinistroConverter.cs b/Gestor.Application/Converters/TipoSinistroConverter.cs deleted file mode 100644 index c965cdc..0000000 --- a/Gestor.Application/Converters/TipoSinistroConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class TipoSinistroConverter : MarkupExtension, IValueConverter - { - public TipoSinistroConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - return (value == null ? true : (TipoSinistro)value != 0); - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/TipoTelefoneVisibilityConverter.cs b/Gestor.Application/Converters/TipoTelefoneVisibilityConverter.cs deleted file mode 100644 index 795bec4..0000000 --- a/Gestor.Application/Converters/TipoTelefoneVisibilityConverter.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Gestor.Model.Common; -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class TipoTelefoneVisibilityConverter : MarkupExtension, IValueConverter - { - public TipoTelefoneVisibilityConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value != null && ((TipoTelefone)value == 9 || (TipoTelefone)value == 3 || (TipoTelefone)value == 2 || (TipoTelefone)value == 5 || (TipoTelefone)value == 1)) - { - return Visibility.Visible; - } - return Visibility.Collapsed; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return null; - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/TootipStatusConverter.cs b/Gestor.Application/Converters/TootipStatusConverter.cs deleted file mode 100644 index 63a9bba..0000000 --- a/Gestor.Application/Converters/TootipStatusConverter.cs +++ /dev/null @@ -1,75 +0,0 @@ -using Gestor.Model.Common; -using Gestor.Model.Validation; -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Media; - -namespace Gestor.Application.Converters -{ - public class TootipStatusConverter : IMultiValueConverter - { - public TootipStatusConverter() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - if (values[2] != null && values[2] is bool && (bool)values[2]) - { - return "DOCUMENTO EXCLUÍDO"; - } - object obj = values[0]; - if (obj == null) - { - return ""; - } - if (!(obj is TipoSeguro)) - { - return new SolidColorBrush(Colors.White); - } - switch ((TipoSeguro)values[0]) - { - case 3: - { - return "DOCUMENTO CANCELADO"; - } - case 5: - { - return "DOCUMENTO RENOVADO"; - } - case 6: - { - return "DOCUMENTO PERDIDO"; - } - case 7: - { - return "DOCUMENTO RECUSADO"; - } - default: - { - if (values[1] == null) - { - return "DOCUMENTO VIGENTE"; - } - else - { - break; - } - } - } - DateTime? nullable = (DateTime?)values[1]; - DateTime dateTime = Funcoes.GetNetworkTime().Date.AddDays(-6); - if ((nullable.HasValue ? nullable.GetValueOrDefault() < dateTime : true)) - { - return "DOCUMENTO VENCIDO"; - } - return "DOCUMENTO VIGENTE"; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - return null; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/TypeVisibilityConverter.cs b/Gestor.Application/Converters/TypeVisibilityConverter.cs deleted file mode 100644 index 5ba5b06..0000000 --- a/Gestor.Application/Converters/TypeVisibilityConverter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class TypeVisibilityConverter : IMultiValueConverter - { - public TypeVisibilityConverter() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - object obj; - try - { - obj = (values[0] == null || values[1] == null ? Visibility.Collapsed : ((Type)values[0] == (Type)values[1] ? Visibility.Visible : Visibility.Collapsed)); - } - catch (Exception exception) - { - obj = Visibility.Collapsed; - } - return obj; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - return null; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/ValorTipoConverter.cs b/Gestor.Application/Converters/ValorTipoConverter.cs deleted file mode 100644 index 3566d8f..0000000 --- a/Gestor.Application/Converters/ValorTipoConverter.cs +++ /dev/null @@ -1,47 +0,0 @@ -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 - { - public ValorTipoConverter() - { - } - - public override object ProvideValue(IServiceProvider serviceProvider) - { - return this; - } - - object System.Windows.Data.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) - { - return values[1].ToString(); - } - string str = values[0].ToString(); - if (str == "VALOR") - { - return ((decimal)values[1]).ToString("c2"); - } - if (str != "PERCENTUAL") - { - return values[1].ToString(); - } - return ((decimal)values[1]).ToString("p2"); - } - - object[] System.Windows.Data.IMultiValueConverter.ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/VariavelExisteColorConverter.cs b/Gestor.Application/Converters/VariavelExisteColorConverter.cs deleted file mode 100644 index 8f7510c..0000000 --- a/Gestor.Application/Converters/VariavelExisteColorConverter.cs +++ /dev/null @@ -1,38 +0,0 @@ -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 VariavelExisteColorConverter() - { - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value == null) - { - return new SolidColorBrush(Colors.Red); - } - if (!(bool)value) - { - return new SolidColorBrush(Colors.Black); - } - return 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; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/VariavelExisteTooltipConverter.cs b/Gestor.Application/Converters/VariavelExisteTooltipConverter.cs deleted file mode 100644 index e0328f2..0000000 --- a/Gestor.Application/Converters/VariavelExisteTooltipConverter.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; -using System.Windows.Markup; - -namespace Gestor.Application.Converters -{ - public class VariavelExisteTooltipConverter : MarkupExtension, IValueConverter - { - public VariavelExisteTooltipConverter() - { - } - - 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; - } - } -} \ No newline at end of file diff --git a/Gestor.Application/Converters/VerApoliceComissaoConverter.cs b/Gestor.Application/Converters/VerApoliceComissaoConverter.cs deleted file mode 100644 index 4048ab5..0000000 --- a/Gestor.Application/Converters/VerApoliceComissaoConverter.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Globalization; -using System.Windows; -using System.Windows.Data; - -namespace Gestor.Application.Converters -{ - public class VerApoliceComissaoConverter : IMultiValueConverter - { - public VerApoliceComissaoConverter() - { - } - - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - object obj; - try - { - if (values[0] != null || values[1] != null) - { - long? nullable = (long?)values[0]; - long num = (long)0; - if (nullable.GetValueOrDefault() == num & nullable.HasValue) - { - nullable = (long?)values[1]; - num = (long)0; - if (nullable.GetValueOrDefault() == num & nullable.HasValue) - { - obj = Visibility.Collapsed; - return obj; - } - } - obj = Visibility.Visible; - } - else - { - obj = Visibility.Collapsed; - } - } - catch (Exception exception) - { - obj = Visibility.Collapsed; - } - return obj; - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - return null; - } - } -} \ No newline at end of file -- cgit v1.2.3