From 225aa1499e37faf9d38257caabbadc68d78b427e Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 12:29:41 -0300 Subject: decompiler.com --- .../ManutencaoPagamentosView.cs | 266 +++++++++++++++++++++ 1 file changed, 266 insertions(+) create mode 100644 Decompiler/Gestor.Application.Views.Ferramentas/ManutencaoPagamentosView.cs (limited to 'Decompiler/Gestor.Application.Views.Ferramentas/ManutencaoPagamentosView.cs') diff --git a/Decompiler/Gestor.Application.Views.Ferramentas/ManutencaoPagamentosView.cs b/Decompiler/Gestor.Application.Views.Ferramentas/ManutencaoPagamentosView.cs new file mode 100644 index 0000000..a6d7bb5 --- /dev/null +++ b/Decompiler/Gestor.Application.Views.Ferramentas/ManutencaoPagamentosView.cs @@ -0,0 +1,266 @@ +using System; +using System.CodeDom.Compiler; +using System.ComponentModel; +using System.Diagnostics; +using System.Linq; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Input; +using System.Windows.Markup; +using Gestor.Application.Servicos.Seguros; +using Gestor.Application.ViewModels.Ferramentas; +using Gestor.Application.Views.Generic; +using Gestor.Application.Views.Seguros; +using Gestor.Model.Common; +using Gestor.Model.Domain.Ferramentas; +using Gestor.Model.Domain.Relatorios; +using Gestor.Model.Domain.Seguros; +using MaterialDesignThemes.Wpf; +using Xceed.Wpf.AvalonDock.Controls; + +namespace Gestor.Application.Views.Ferramentas; + +public class ManutencaoPagamentosView : BaseUserControl, IComponentConnector, IStyleConnector +{ + private bool _contentLoaded; + + public ManutencaoPagamentosViewModel ViewModel { get; set; } + + public ManutencaoPagamentosView() + { + ((FrameworkElement)this).Tag = "MANUTENÇÃO DE PAGAMENTOS"; + ViewModel = new ManutencaoPagamentosViewModel(); + ((FrameworkElement)this).DataContext = ViewModel; + InitializeComponent(); + } + + private async void Buscar_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.Loading(isLoading: true); + await ViewModel.Buscar(); + ViewModel.Loading(isLoading: false); + } + + private async void Excluir_OnClick(object sender, RoutedEventArgs e) + { + if (ViewModel.Pagamentos == null || ViewModel.Pagamentos.All((ManutencaoPagamentos x) => !x.Selecionado)) + { + await ViewModel.ShowMessage("NECESSÁRIO SELECIONAR OS PAGAMENTOS QUE DESEJA EXCLUIR ANTES DE PROSSEGUIR"); + return; + } + bool? flag = await ViewModel.ShowSenha("DESEJA REALMENTE EXCLUIR OS PAGAMENTOS SELECIONADOS?\nESSE PROCEDIMENTO É IRREVERSÍVEL."); + if (flag.HasValue) + { + if (!flag.GetValueOrDefault()) + { + await ViewModel.ShowMessage("SENHA INVÁLIDA"); + return; + } + ViewModel.Loading(isLoading: true); + await ViewModel.Excluir(); + ViewModel.Loading(isLoading: false); + } + } + + private void CheckBox_Checked(object sender, RoutedEventArgs e) + { + ViewModel.Selecionar(value: true); + } + + private async void Apolice_OnClick(object sender, RoutedEventArgs e) + { + Button val = (Button)sender; + ManutencaoPagamentos manutencao = (ManutencaoPagamentos)((FrameworkElement)val).DataContext; + if (manutencao != null) + { + ViewModel.Loading(isLoading: true); + long idDocumento = manutencao.IdDocumento; + Documento val2 = await new ApoliceServico().BuscarApoliceAsync(idDocumento); + if (val2 == null) + { + ViewModel.Loading(isLoading: false); + return; + } + ((Window)new HosterWindow((ContentControl)(object)new ApoliceView(val2, lockInsert: true, invoke: false, (AcessoApolice)1, manutencao.IdParcela), "CADASTRO DE APÓLICES - " + val2.Controle.Cliente.Nome)).Show(); + ViewModel.Loading(isLoading: false); + } + } + + private void UnCheckBox_Checked(object sender, RoutedEventArgs e) + { + ViewModel.Selecionar(value: false); + } + + private void FecharFiltro_OnClick(object sender, RoutedEventArgs e) + { + //IL_000c: Unknown result type (might be due to invalid IL or missing references) + //IL_0012: Invalid comparison between Unknown and I4 + ViewModel.VisibilityFiltroPersonalizado = (Visibility)(((int)ViewModel.VisibilityFiltroPersonalizado != 2) ? 2 : 0); + } + + private void AdicionarFiltro_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.AdcionarFiltroPersonalizado(); + } + + private void ExcluirFiltro_OnClick(object sender, RoutedEventArgs e) + { + //IL_002e: Unknown result type (might be due to invalid IL or missing references) + //IL_0034: Expected O, but got Unknown + Chip val = (Chip)((sender is Chip) ? sender : null); + if (val != null) + { + ListBox val2 = Extentions.FindVisualAncestor((DependencyObject)(object)val); + FiltroPersonalizado val3 = (FiltroPersonalizado)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)]; + if (val3 != null) + { + ViewModel.FiltroPersonalizadoSelecionado.Remove(val3); + ViewModel.PesquisaPersonalizada(); + } + } + } + + [DebuggerNonUserCode] + [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() + { + if (!_contentLoaded) + { + _contentLoaded = true; + Uri uri = new Uri("/Gestor.Application;component/views/ferramentas/manutencaopagamentosview.xaml", UriKind.Relative); + Application.LoadComponent((object)this, uri); + } + } + + [DebuggerNonUserCode] + [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] + internal Delegate _CreateDelegate(Type delegateType, string handler) + { + return Delegate.CreateDelegate(delegateType, this, handler); + } + + [DebuggerNonUserCode] + [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] + [EditorBrowsable(EditorBrowsableState.Never)] + void IComponentConnector.Connect(int connectionId, object target) + { + //IL_0032: Unknown result type (might be due to invalid IL or missing references) + //IL_003e: Unknown result type (might be due to invalid IL or missing references) + //IL_0048: Expected O, but got Unknown + //IL_0049: Unknown result type (might be due to invalid IL or missing references) + //IL_0055: Unknown result type (might be due to invalid IL or missing references) + //IL_005f: Expected O, but got Unknown + //IL_0060: Unknown result type (might be due to invalid IL or missing references) + //IL_006c: Unknown result type (might be due to invalid IL or missing references) + //IL_0076: Expected O, but got Unknown + //IL_0078: Unknown result type (might be due to invalid IL or missing references) + //IL_0084: Unknown result type (might be due to invalid IL or missing references) + //IL_008e: Expected O, but got Unknown + //IL_008f: Unknown result type (might be due to invalid IL or missing references) + //IL_009b: Unknown result type (might be due to invalid IL or missing references) + //IL_00a5: Expected O, but got Unknown + //IL_00a6: Unknown result type (might be due to invalid IL or missing references) + //IL_00b2: Unknown result type (might be due to invalid IL or missing references) + //IL_00bc: Expected O, but got Unknown + //IL_00be: Unknown result type (might be due to invalid IL or missing references) + //IL_00ca: Unknown result type (might be due to invalid IL or missing references) + //IL_00d4: Expected O, but got Unknown + //IL_00d6: Unknown result type (might be due to invalid IL or missing references) + //IL_00e2: Unknown result type (might be due to invalid IL or missing references) + //IL_00ec: Expected O, but got Unknown + //IL_00ee: Unknown result type (might be due to invalid IL or missing references) + //IL_00fa: Unknown result type (might be due to invalid IL or missing references) + //IL_0104: Expected O, but got Unknown + //IL_0106: Unknown result type (might be due to invalid IL or missing references) + //IL_0112: Unknown result type (might be due to invalid IL or missing references) + //IL_011c: Expected O, but got Unknown + //IL_011e: Unknown result type (might be due to invalid IL or missing references) + //IL_012a: Unknown result type (might be due to invalid IL or missing references) + //IL_0134: Expected O, but got Unknown + //IL_0135: Unknown result type (might be due to invalid IL or missing references) + //IL_0141: Unknown result type (might be due to invalid IL or missing references) + //IL_014b: Expected O, but got Unknown + //IL_014d: Unknown result type (might be due to invalid IL or missing references) + //IL_0159: Unknown result type (might be due to invalid IL or missing references) + //IL_0163: Expected O, but got Unknown + //IL_0164: Unknown result type (might be due to invalid IL or missing references) + //IL_0170: Unknown result type (might be due to invalid IL or missing references) + //IL_017a: Expected O, but got Unknown + //IL_017c: Unknown result type (might be due to invalid IL or missing references) + //IL_0188: Unknown result type (might be due to invalid IL or missing references) + //IL_0192: Expected O, but got Unknown + switch (connectionId) + { + case 1: + ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); + ((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); + ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); + break; + case 2: + ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); + ((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); + ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); + break; + case 3: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Buscar_OnClick); + break; + case 4: + ((MenuItem)target).Click += new RoutedEventHandler(Excluir_OnClick); + break; + case 5: + ((MenuItem)target).Click += new RoutedEventHandler(FecharFiltro_OnClick); + break; + case 6: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(FecharFiltro_OnClick); + break; + case 7: + ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); + ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); + break; + case 8: + ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); + ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); + break; + case 9: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(AdicionarFiltro_OnClick); + break; + default: + _contentLoaded = true; + break; + } + } + + [DebuggerNonUserCode] + [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] + [EditorBrowsable(EditorBrowsableState.Never)] + void IStyleConnector.Connect(int connectionId, object target) + { + //IL_0017: Unknown result type (might be due to invalid IL or missing references) + //IL_0023: Unknown result type (might be due to invalid IL or missing references) + //IL_002d: Expected O, but got Unknown + //IL_002f: Unknown result type (might be due to invalid IL or missing references) + //IL_003b: Unknown result type (might be due to invalid IL or missing references) + //IL_0045: Expected O, but got Unknown + //IL_0046: Unknown result type (might be due to invalid IL or missing references) + //IL_0052: Unknown result type (might be due to invalid IL or missing references) + //IL_005c: Expected O, but got Unknown + //IL_005e: Unknown result type (might be due to invalid IL or missing references) + //IL_006a: Unknown result type (might be due to invalid IL or missing references) + //IL_0074: Expected O, but got Unknown + switch (connectionId) + { + case 10: + ((Chip)target).DeleteClick += new RoutedEventHandler(ExcluirFiltro_OnClick); + break; + case 11: + ((ToggleButton)(CheckBox)target).Checked += new RoutedEventHandler(CheckBox_Checked); + ((ToggleButton)(CheckBox)target).Unchecked += new RoutedEventHandler(UnCheckBox_Checked); + break; + case 12: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Apolice_OnClick); + break; + } + } +} -- cgit v1.2.3