summaryrefslogtreecommitdiff
path: root/Decompiler/Gestor.Application.Drawers
diff options
context:
space:
mode:
authorLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 15:29:41 +0000
committerLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 15:29:41 +0000
commit225aa1499e37faf9d38257caabbadc68d78b427e (patch)
tree102bb7a40c58595348ae9d3c7076201759fe0720 /Decompiler/Gestor.Application.Drawers
parent1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (diff)
downloadgestor-225aa1499e37faf9d38257caabbadc68d78b427e.tar.gz
gestor-225aa1499e37faf9d38257caabbadc68d78b427e.zip
decompiler.com
Diffstat (limited to 'Decompiler/Gestor.Application.Drawers')
-rw-r--r--Decompiler/Gestor.Application.Drawers/AdiantamentoDrawerView.cs255
-rw-r--r--Decompiler/Gestor.Application.Drawers/AgendaDrawer.cs605
-rw-r--r--Decompiler/Gestor.Application.Drawers/ArquivoDigitalDrawer.cs712
-rw-r--r--Decompiler/Gestor.Application.Drawers/ExpedicaoDrawer.cs289
-rw-r--r--Decompiler/Gestor.Application.Drawers/ExtratosDrawer.cs246
-rw-r--r--Decompiler/Gestor.Application.Drawers/ImpostoDrawer.cs274
-rw-r--r--Decompiler/Gestor.Application.Drawers/InclusaoArquivoDigitalDrawer.cs182
-rw-r--r--Decompiler/Gestor.Application.Drawers/InfoDrawer.cs196
-rw-r--r--Decompiler/Gestor.Application.Drawers/LogDrawer.cs92
-rw-r--r--Decompiler/Gestor.Application.Drawers/LogEmailDrawer.cs80
-rw-r--r--Decompiler/Gestor.Application.Drawers/LogSistemaAntigo.cs71
-rw-r--r--Decompiler/Gestor.Application.Drawers/LogUtilizacaoDrawer.cs70
-rw-r--r--Decompiler/Gestor.Application.Drawers/MetaSeguradoraView.cs226
-rw-r--r--Decompiler/Gestor.Application.Drawers/MetaVendedorView.cs231
-rw-r--r--Decompiler/Gestor.Application.Drawers/ObservacoesDrawer.cs239
-rw-r--r--Decompiler/Gestor.Application.Drawers/PermissaoUsuarioDrawer.cs738
-rw-r--r--Decompiler/Gestor.Application.Drawers/TarefaDrawer.cs555
-rw-r--r--Decompiler/Gestor.Application.Drawers/ValoresApoliceDrawer.cs62
-rw-r--r--Decompiler/Gestor.Application.Drawers/ValoresParcelaDrawer.cs70
-rw-r--r--Decompiler/Gestor.Application.Drawers/VinculoVendedorDrawer.cs135
20 files changed, 5328 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.Drawers/AdiantamentoDrawerView.cs b/Decompiler/Gestor.Application.Drawers/AdiantamentoDrawerView.cs
new file mode 100644
index 0000000..74ea3b8
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/AdiantamentoDrawerView.cs
@@ -0,0 +1,255 @@
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+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 System.Windows.Threading;
+using CurrencyTextBoxControl;
+using Gestor.Application.Helpers;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Application.Views.Generic;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Generic;
+using Gestor.Model.Domain.Seguros;
+using MaterialDesignThemes.Wpf;
+
+namespace Gestor.Application.Drawers;
+
+public class AdiantamentoDrawerView : BaseUserControl, IComponentConnector
+{
+ internal ProgressBar ProgressBar;
+
+ internal DataGrid AdiantamentoGrid;
+
+ internal CurrencyTextBox RendaMensalBox;
+
+ internal Snackbar Snackbar;
+
+ private bool _contentLoaded;
+
+ public AdiantamentoViewModel ViewModel { get; set; }
+
+ public AdiantamentoDrawerView(Vendedor vendedor)
+ {
+ ViewModel = new AdiantamentoViewModel(vendedor);
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ }
+
+ private async void MenuList_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ ListBox val = (ListBox)sender;
+ if (((Selector)val).SelectedItem != null)
+ {
+ await ViewModel.CarregarAdiantamento(((Selector)val).SelectedIndex);
+ }
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ private void Incluir_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Incluir();
+ }
+
+ private void Alterar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Alterar(alterar: true);
+ }
+
+ private async void Salvar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Carregando = true;
+ List<KeyValuePair<string, string>> list = await ViewModel.Salvar();
+ ((DependencyObject)(object)this).ValidateFields(list);
+ bool num = list == null || list.Count == 0;
+ ((CollectionView)((ItemsControl)AdiantamentoGrid).Items).Refresh();
+ ViewModel.Carregando = false;
+ ViewModel.Loading(isLoading: false);
+ if (num)
+ {
+ ToggleSnackBar("ADIANTAMENTO SALVO COM SUCESSO");
+ }
+ else
+ {
+ await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK");
+ }
+ }
+
+ public void ToggleSnackBar(string message, bool active = true)
+ {
+ ((ContentControl)Snackbar.Message).Content = message;
+ Snackbar.IsActive = active;
+ if (active)
+ {
+ Task.Factory.StartNew(CloseSlackBar);
+ }
+ }
+
+ private void CloseSlackBar()
+ {
+ Thread.Sleep(5000);
+ Dispatcher dispatcher = ((DispatcherObject)ProgressBar).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)4, (Delegate)(Action)delegate
+ {
+ ToggleSnackBar("", active: false);
+ });
+ }
+ }
+
+ private void Cancelar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CancelarAlteracao();
+ }
+
+ private async void Excluir_OnClick(object sender, RoutedEventArgs e)
+ {
+ if (await ViewModel.Excluir())
+ {
+ ToggleSnackBar("ADIANTAMENTO EXCLUÍDO COM SUCESSO");
+ }
+ }
+
+ private void SnackbarMessage_ActionClick(object sender, RoutedEventArgs e)
+ {
+ Snackbar.IsActive = false;
+ }
+
+ private void AbrirLog_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.AbrirLog((TipoTela)36, ((DomainBase)ViewModel.SelectedAdiantamento).Id);
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/adiantamentodrawerview.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_0047: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0051: Expected O, but got Unknown
+ //IL_0053: Unknown result type (might be due to invalid IL or missing references)
+ //IL_005f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0069: Expected O, but got Unknown
+ //IL_006b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0077: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0081: Expected O, but got Unknown
+ //IL_0084: Unknown result type (might be due to invalid IL or missing references)
+ //IL_008e: Expected O, but got Unknown
+ //IL_0090: Unknown result type (might be due to invalid IL or missing references)
+ //IL_009c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a6: Expected O, but got Unknown
+ //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b4: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00be: Expected O, but got Unknown
+ //IL_00c0: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00cc: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00d6: Expected O, but got Unknown
+ //IL_00d8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00e4: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ee: Expected O, but got Unknown
+ //IL_00f0: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00fc: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0106: Expected O, but got Unknown
+ //IL_0108: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0114: Unknown result type (might be due to invalid IL or missing references)
+ //IL_011e: Expected O, but got Unknown
+ //IL_0120: Unknown result type (might be due to invalid IL or missing references)
+ //IL_012c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0136: Expected O, but got Unknown
+ //IL_0137: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0143: Unknown result type (might be due to invalid IL or missing references)
+ //IL_014d: Expected O, but got Unknown
+ //IL_014e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_015a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0164: Expected O, but got Unknown
+ //IL_0167: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0171: Expected O, but got Unknown
+ //IL_0174: Unknown result type (might be due to invalid IL or missing references)
+ //IL_017e: Expected O, but got Unknown
+ //IL_0180: Unknown result type (might be due to invalid IL or missing references)
+ //IL_018c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0196: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ ProgressBar = (ProgressBar)target;
+ break;
+ case 2:
+ ((Selector)(ListBox)target).SelectionChanged += new SelectionChangedEventHandler(MenuList_OnSelectionChanged);
+ break;
+ case 3:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 4:
+ AdiantamentoGrid = (DataGrid)target;
+ break;
+ case 5:
+ ((MenuItem)target).Click += new RoutedEventHandler(Incluir_OnClick);
+ break;
+ case 6:
+ ((MenuItem)target).Click += new RoutedEventHandler(Alterar_OnClick);
+ break;
+ case 7:
+ ((MenuItem)target).Click += new RoutedEventHandler(Salvar_OnClick);
+ break;
+ case 8:
+ ((MenuItem)target).Click += new RoutedEventHandler(Cancelar_OnClick);
+ break;
+ case 9:
+ ((MenuItem)target).Click += new RoutedEventHandler(Excluir_OnClick);
+ break;
+ case 10:
+ ((MenuItem)target).Click += new RoutedEventHandler(AbrirLog_OnClick);
+ break;
+ case 11:
+ ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick);
+ ((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
+ break;
+ case 12:
+ RendaMensalBox = (CurrencyTextBox)target;
+ break;
+ case 13:
+ Snackbar = (Snackbar)target;
+ break;
+ case 14:
+ ((SnackbarMessage)target).ActionClick += new RoutedEventHandler(SnackbarMessage_ActionClick);
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/AgendaDrawer.cs b/Decompiler/Gestor.Application.Drawers/AgendaDrawer.cs
new file mode 100644
index 0000000..3880f6e
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/AgendaDrawer.cs
@@ -0,0 +1,605 @@
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Threading;
+using System.Threading.Tasks;
+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 System.Windows.Threading;
+using Gestor.Application.Componentes;
+using Gestor.Application.Helpers;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Application.Views.Generic;
+using Gestor.Common.Helpers;
+using Gestor.Common.Validation;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Ferramentas;
+using Gestor.Model.Domain.Generic;
+using MaterialDesignThemes.Wpf;
+using Xceed.Wpf.AvalonDock.Controls;
+
+namespace Gestor.Application.Drawers;
+
+public class AgendaDrawer : BaseUserControl, IComponentConnector, IStyleConnector
+{
+ [Serializable]
+ [CompilerGenerated]
+ private sealed class _003C_003Ec
+ {
+ public static readonly _003C_003Ec _003C_003E9 = new _003C_003Ec();
+
+ public static MouseButtonEventHandler _003C_003E9__4_0;
+
+ internal void _003CContentLoad_003Eb__4_0(object sender, MouseButtonEventArgs args)
+ {
+ }
+ }
+
+ internal ProgressBar ProgressBar;
+
+ internal DataGrid AgendaGrid;
+
+ internal MenuItem MaisOpcoesButton;
+
+ internal TextBox NomeBox;
+
+ internal TextBox CepBox;
+
+ internal ProgressBar ProgressCep;
+
+ internal TextBox EnderecoBox;
+
+ internal TextBox BairroBox;
+
+ internal TextBox CidadeBox;
+
+ internal TextBox EstadoBox;
+
+ internal TextBox ObsBox;
+
+ internal ListBox TelefoneListBox;
+
+ internal ListBox EmailListBox;
+
+ internal Snackbar Snackbar;
+
+ private bool _contentLoaded;
+
+ private AgendaViewModel ViewModel { get; }
+
+ public AgendaDrawer()
+ {
+ ViewModel = new AgendaViewModel();
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ Dispatcher dispatcher = ((DispatcherObject)this).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)7, (Delegate)new Action(ContentLoad));
+ }
+ }
+
+ private void ContentLoad()
+ {
+ //IL_0019: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0023: Expected O, but got Unknown
+ //IL_003d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0042: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0048: Expected O, but got Unknown
+ ((Selector)AgendaGrid).SelectedIndex = 0;
+ ((Selector)AgendaGrid).SelectionChanged += new SelectionChangedEventHandler(AgendaGrid_OnSelectionChanged);
+ DataGrid agendaGrid = AgendaGrid;
+ object obj = _003C_003Ec._003C_003E9__4_0;
+ if (obj == null)
+ {
+ MouseButtonEventHandler val = delegate
+ {
+ };
+ _003C_003Ec._003C_003E9__4_0 = val;
+ obj = (object)val;
+ }
+ ((Control)agendaGrid).MouseDoubleClick += (MouseButtonEventHandler)obj;
+ ViewModel.PermissaoWhatsapp = ViewModel.Restricao((TipoRestricao)32);
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ private void Incluir_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Incluir();
+ List<KeyValuePair<string, string>> errorMessages = ViewModel.SelectedAgenda.Validate();
+ ((DependencyObject)(object)this).ValidateFields(errorMessages);
+ }
+
+ private void IncluirEmail_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.IncluirEmail();
+ }
+
+ private void ExcluirEmail_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
+ Button val = (Button)((sender is Button) ? sender : null);
+ if (val != null)
+ {
+ ListBox val2 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val);
+ AgendaEmail email = (AgendaEmail)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ ViewModel.ExcluirEmail(email);
+ }
+ }
+
+ private void IncluirTelefone_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.IncluirTelefone();
+ }
+
+ private void ExcluirTelefone_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
+ Button val = (Button)((sender is Button) ? sender : null);
+ if (val != null)
+ {
+ ListBox val2 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val);
+ AgendaTelefone telefone = (AgendaTelefone)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ ViewModel.ExcluirTelefone(telefone);
+ }
+ }
+
+ private async void Salvar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Carregando = true;
+ List<KeyValuePair<string, string>> list = await ViewModel.Salvar();
+ ((DependencyObject)(object)this).ValidateFields(list);
+ bool num = list == null || list.Count == 0;
+ ViewModel.Carregando = false;
+ if (num)
+ {
+ ToggleSnackBar("AGENDA SALVA COM SUCESSO");
+ }
+ else
+ {
+ await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK");
+ }
+ }
+
+ private void Alterar_OnClick(object sender, RoutedEventArgs e)
+ {
+ //IL_0016: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0020: Expected O, but got Unknown
+ ViewModel.CancelAgenda = (Agenda)((DomainBase)ViewModel.SelectedAgenda).Clone();
+ ViewModel.Alterar(alterar: true);
+ }
+
+ private void Cancelar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CancelarAlteracao();
+ }
+
+ private async void Excluir_OnClick(object sender, RoutedEventArgs e)
+ {
+ if (await ViewModel.Excluir())
+ {
+ ToggleSnackBar("AGENDA EXCLUÍDA COM SUCESSO");
+ }
+ }
+
+ private async void PostcodeBox_OnLostFocus(object sender, RoutedEventArgs e)
+ {
+ string text = ValidationHelper.FormatPostCode(((TextBox)sender).Text);
+ CepBox.Text = text;
+ if (ValidationHelper.ValidatePostCode(text))
+ {
+ EnderecoBase val = await ViewModel.BuscaCep(text);
+ if (val != null)
+ {
+ EnderecoBox.Text = val.Endereco;
+ CidadeBox.Text = val.Cidade;
+ EstadoBox.Text = val.Estado;
+ BairroBox.Text = val.Bairro;
+ }
+ }
+ }
+
+ private void AutoCompleteBox_Populating(object sender, PopulatingEventArgs e)
+ {
+ if (e.Parameter.Length < 3)
+ {
+ return;
+ }
+ e.Cancel = true;
+ ViewModel.Filtrar(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate(Task<List<Agenda>> searchResult)
+ {
+ //IL_000f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0014: Unknown result type (might be due to invalid IL or missing references)
+ if (searchResult.Result != null)
+ {
+ AutoCompleteBox val = (AutoCompleteBox)sender;
+ val.ItemsSource = searchResult.Result;
+ val.PopulateComplete();
+ }
+ }, TaskScheduler.FromCurrentSynchronizationContext());
+ }
+
+ private void AutoCompleteBox_OnTextChanged(object sender, RoutedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ if (string.IsNullOrWhiteSpace(((AutoCompleteBox)sender).Text))
+ {
+ ViewModel.FiltrarAgenda("");
+ }
+ }
+
+ private async void AgendaGrid_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ DataGrid val = (DataGrid)sender;
+ if (val == null || ((Selector)val).SelectedIndex >= 0)
+ {
+ await ViewModel.SelecionaAgenda((Agenda)((val != null) ? ((ItemsControl)val).Items[((Selector)val).SelectedIndex] : null));
+ }
+ }
+
+ private void SnackbarMessage_ActionClick(object sender, RoutedEventArgs e)
+ {
+ Snackbar.IsActive = false;
+ }
+
+ public void ToggleSnackBar(string message, bool active = true)
+ {
+ ((ContentControl)Snackbar.Message).Content = message;
+ Snackbar.IsActive = active;
+ if (active)
+ {
+ Task.Factory.StartNew(CloseSlackBar);
+ }
+ }
+
+ private void CloseSlackBar()
+ {
+ Thread.Sleep(5000);
+ Dispatcher dispatcher = ((DispatcherObject)ProgressBar).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)4, (Delegate)(Action)delegate
+ {
+ ToggleSnackBar("", active: false);
+ });
+ }
+ }
+
+ private async void WhatsAppMessage_Click(object sender, RoutedEventArgs e)
+ {
+ Button val = (Button)sender;
+ ListBox val2 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val);
+ TelefoneBase val3 = (TelefoneBase)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ if (!((val3.Tipo.HasValue && (int)val3.Tipo.GetValueOrDefault() == 8) ? (val3.Prefixo + val3.Numero).Clear() : ("55" + val3.Prefixo + val3.Numero.Clear())).EnviarWhatsapp())
+ {
+ await ViewModel.ShowMessage("HOUVE UM PROBLEMA AO ABRIR LINK DO WHATSAPP, O LINK FOI COPIADO EM SUA MAQUINA, BASTA ABRIR O NAVEGADOR DE INTERNET E COLAR NA BARRA DE ENDEREÇOS");
+ }
+ }
+
+ private void CopyTelefoneToClipBoard_Click(object sender, RoutedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ //IL_002a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0030: Expected O, but got Unknown
+ Button val = (Button)sender;
+ ListBox val2 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val);
+ TelefoneBase val3 = (TelefoneBase)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ (val3.Prefixo + ValidationHelper.OnlyNumber(val3.Numero)).CopyToClipboard();
+ ToggleSnackBar("COPIADO - " + val3.Prefixo + ValidationHelper.OnlyNumber(val3.Numero));
+ }
+
+ private void CopyEmailToClipBoard_Click(object sender, RoutedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ //IL_002a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0030: Expected O, but got Unknown
+ Button val = (Button)sender;
+ ListBox val2 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val);
+ EmailBase val3 = (EmailBase)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ val3.Email.CopyToClipboard();
+ ToggleSnackBar("COPIADO - " + val3.Email);
+ }
+
+ private void AbrirLog_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.AbrirLog((TipoTela)34, ((DomainBase)ViewModel.SelectedAgenda).Id);
+ }
+
+ private void TipoComboBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ //IL_003c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0046: Expected O, but got Unknown
+ //IL_009d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a3: Invalid comparison between Unknown and I4
+ ComboBox val = (ComboBox)sender;
+ CustomIsReadOnlyControl customIsReadOnlyControl = Extentions.FindVisualAncestor<CustomIsReadOnlyControl>((DependencyObject)(object)val);
+ if (customIsReadOnlyControl == null)
+ {
+ return;
+ }
+ WrapPanel val2 = Extentions.FindVisualAncestor<WrapPanel>((DependencyObject)(object)customIsReadOnlyControl);
+ ListBox val3 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val2);
+ ContentPresenter val4 = FindVisualChild.Find<ContentPresenter>((DependencyObject)(ListBoxItem)((ItemsControl)val3).ItemContainerGenerator.ContainerFromIndex(((CollectionView)((ItemsControl)val3).Items).IndexOf(((FrameworkElement)val2).DataContext)));
+ DataTemplate contentTemplate = val4.ContentTemplate;
+ CustomItemValidation customItemValidation = (CustomItemValidation)((FrameworkTemplate)contentTemplate).FindName("Prefixo", (FrameworkElement)(object)val4);
+ CustomItemValidation depObj = (CustomItemValidation)((FrameworkTemplate)contentTemplate).FindName("Telefone", (FrameworkElement)(object)val4);
+ TextBox? obj = ((DependencyObject)(object)customItemValidation).FindChildren<TextBox>().FirstOrDefault();
+ TextBox val5 = ((DependencyObject)(object)depObj).FindChildren<TextBox>().FirstOrDefault();
+ if (obj != null && val5 != null)
+ {
+ if ((int)(TipoTelefone)((Selector)val).SelectedValue != 8)
+ {
+ ((UIElement)customItemValidation).Visibility = (Visibility)0;
+ val5.MaxLength = 10;
+ int length = ((val5.Text.Length >= 10) ? 10 : val5.Text.Length);
+ val5.Text = val5.Text.Substring(0, length);
+ }
+ else
+ {
+ ((UIElement)customItemValidation).Visibility = (Visibility)2;
+ val5.MaxLength = 20;
+ }
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/agendadrawer.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_0093: Unknown result type (might be due to invalid IL or missing references)
+ //IL_009d: Expected O, but got Unknown
+ //IL_009f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ab: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b5: Expected O, but got Unknown
+ //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00c3: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00cd: Expected O, but got Unknown
+ //IL_00ce: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00da: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00e4: Expected O, but got Unknown
+ //IL_00e7: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00f1: Expected O, but got Unknown
+ //IL_00f3: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ff: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0109: Expected O, but got Unknown
+ //IL_010b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0117: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0121: Expected O, but got Unknown
+ //IL_0123: Unknown result type (might be due to invalid IL or missing references)
+ //IL_012f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0139: Expected O, but got Unknown
+ //IL_013b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0147: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0151: Expected O, but got Unknown
+ //IL_0153: Unknown result type (might be due to invalid IL or missing references)
+ //IL_015f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0169: Expected O, but got Unknown
+ //IL_016c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0176: Expected O, but got Unknown
+ //IL_0178: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0184: Unknown result type (might be due to invalid IL or missing references)
+ //IL_018e: Expected O, but got Unknown
+ //IL_0191: Unknown result type (might be due to invalid IL or missing references)
+ //IL_019b: Expected O, but got Unknown
+ //IL_019e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01a8: Expected O, but got Unknown
+ //IL_01b5: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01bf: Expected O, but got Unknown
+ //IL_01cd: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01d7: Expected O, but got Unknown
+ //IL_01da: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01e4: Expected O, but got Unknown
+ //IL_01e7: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01f1: Expected O, but got Unknown
+ //IL_01f4: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01fe: Expected O, but got Unknown
+ //IL_0201: Unknown result type (might be due to invalid IL or missing references)
+ //IL_020b: Expected O, but got Unknown
+ //IL_020e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0218: Expected O, but got Unknown
+ //IL_021b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0225: Expected O, but got Unknown
+ //IL_0227: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0233: Unknown result type (might be due to invalid IL or missing references)
+ //IL_023d: Expected O, but got Unknown
+ //IL_0240: Unknown result type (might be due to invalid IL or missing references)
+ //IL_024a: Expected O, but got Unknown
+ //IL_024c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0258: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0262: Expected O, but got Unknown
+ //IL_0265: Unknown result type (might be due to invalid IL or missing references)
+ //IL_026f: Expected O, but got Unknown
+ //IL_0272: Unknown result type (might be due to invalid IL or missing references)
+ //IL_027c: Expected O, but got Unknown
+ //IL_027e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_028a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0294: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ ProgressBar = (ProgressBar)target;
+ break;
+ case 2:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 3:
+ ((AutoCompleteBox)target).Populating += new PopulatingEventHandler(AutoCompleteBox_Populating);
+ ((AutoCompleteBox)target).TextChanged += new RoutedEventHandler(AutoCompleteBox_OnTextChanged);
+ break;
+ case 4:
+ AgendaGrid = (DataGrid)target;
+ break;
+ case 5:
+ ((MenuItem)target).Click += new RoutedEventHandler(Incluir_OnClick);
+ break;
+ case 6:
+ ((MenuItem)target).Click += new RoutedEventHandler(Alterar_OnClick);
+ break;
+ case 7:
+ ((MenuItem)target).Click += new RoutedEventHandler(Salvar_OnClick);
+ break;
+ case 8:
+ ((MenuItem)target).Click += new RoutedEventHandler(Cancelar_OnClick);
+ break;
+ case 9:
+ ((MenuItem)target).Click += new RoutedEventHandler(Excluir_OnClick);
+ break;
+ case 10:
+ MaisOpcoesButton = (MenuItem)target;
+ break;
+ case 11:
+ ((MenuItem)target).Click += new RoutedEventHandler(AbrirLog_OnClick);
+ break;
+ case 12:
+ NomeBox = (TextBox)target;
+ break;
+ case 13:
+ CepBox = (TextBox)target;
+ ((UIElement)CepBox).LostFocus += new RoutedEventHandler(PostcodeBox_OnLostFocus);
+ ((UIElement)CepBox).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
+ break;
+ case 14:
+ ProgressCep = (ProgressBar)target;
+ break;
+ case 15:
+ EnderecoBox = (TextBox)target;
+ break;
+ case 16:
+ BairroBox = (TextBox)target;
+ break;
+ case 17:
+ CidadeBox = (TextBox)target;
+ break;
+ case 18:
+ EstadoBox = (TextBox)target;
+ break;
+ case 19:
+ ObsBox = (TextBox)target;
+ break;
+ case 20:
+ ((MenuItem)target).Click += new RoutedEventHandler(IncluirTelefone_OnClick);
+ break;
+ case 21:
+ TelefoneListBox = (ListBox)target;
+ break;
+ case 28:
+ ((MenuItem)target).Click += new RoutedEventHandler(IncluirEmail_OnClick);
+ break;
+ case 29:
+ EmailListBox = (ListBox)target;
+ break;
+ case 32:
+ Snackbar = (Snackbar)target;
+ break;
+ case 33:
+ ((SnackbarMessage)target).ActionClick += new RoutedEventHandler(SnackbarMessage_ActionClick);
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IStyleConnector.Connect(int connectionId, object target)
+ {
+ //IL_0033: Unknown result type (might be due to invalid IL or missing references)
+ //IL_003f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0049: Expected O, but got Unknown
+ //IL_004b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0058: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0062: Expected O, but got Unknown
+ //IL_0064: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0071: Unknown result type (might be due to invalid IL or missing references)
+ //IL_007b: Expected O, but got Unknown
+ //IL_007c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0089: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0093: Expected O, but got Unknown
+ //IL_0095: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a1: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ab: Expected O, but got Unknown
+ //IL_00ad: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b9: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00c3: Expected O, but got Unknown
+ //IL_00c5: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00d1: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00db: Expected O, but got Unknown
+ //IL_00dd: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00e9: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00f3: Expected O, but got Unknown
+ //IL_00f5: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0101: Unknown result type (might be due to invalid IL or missing references)
+ //IL_010b: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 22:
+ ((Selector)(ComboBox)target).SelectionChanged += new SelectionChangedEventHandler(TipoComboBox_OnSelectionChanged);
+ break;
+ case 23:
+ ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
+ break;
+ case 24:
+ ((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(FormatarTelefone);
+ ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
+ break;
+ case 25:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(ExcluirTelefone_OnClick);
+ break;
+ case 26:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(CopyTelefoneToClipBoard_Click);
+ break;
+ case 27:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(WhatsAppMessage_Click);
+ break;
+ case 30:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(ExcluirEmail_OnClick);
+ break;
+ case 31:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(CopyEmailToClipBoard_Click);
+ break;
+ case 28:
+ case 29:
+ break;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/ArquivoDigitalDrawer.cs b/Decompiler/Gestor.Application.Drawers/ArquivoDigitalDrawer.cs
new file mode 100644
index 0000000..c745586
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/ArquivoDigitalDrawer.cs
@@ -0,0 +1,712 @@
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Threading.Tasks;
+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 System.Windows.Threading;
+using Gestor.Application.Helpers;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Application.Views.Ferramentas;
+using Gestor.Application.Views.Generic;
+using Gestor.Common.Security;
+using Gestor.Common.Validation;
+using Gestor.Model.API;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Common;
+using Gestor.Model.Domain.Generic;
+using Gestor.Model.Domain.MalaDireta;
+using Gestor.Model.Domain.Seguros;
+using Gestor.Model.License;
+using MaterialDesignThemes.Wpf;
+using Xceed.Wpf.AvalonDock.Controls;
+
+namespace Gestor.Application.Drawers;
+
+public class ArquivoDigitalDrawer : UserControl, IComponentConnector, IStyleConnector
+{
+ internal ProgressBar ProgressBar;
+
+ internal TextBlock TitleBox;
+
+ internal DataGrid ArquivoGrid;
+
+ internal TextBox DocumentoBox;
+
+ internal Snackbar SnackbarArquivoDigital;
+
+ private bool _contentLoaded;
+
+ public ArquivoDigitalViewModel ViewModel { get; set; }
+
+ private FiltroArquivoDigital Filtro { get; }
+
+ public ArquivoDigitalDrawer(FiltroArquivoDigital filtro)
+ {
+ //IL_005c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00d0: Unknown result type (might be due to invalid IL or missing references)
+ ViewModel = new ArquivoDigitalViewModel(filtro);
+ Filtro = filtro;
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ Dispatcher dispatcher = ((DispatcherObject)this).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)7, (Delegate)new Action(ContentLoad));
+ }
+ ViewModel.RegistrarAcao("ACESSOU ARQUIVO DIGITAL DE " + ((filtro != null) ? ValidationHelper.GetDescription((Enum)(object)filtro.Tipo) : null) + ((filtro == null || filtro.Id != 0) ? $" DO DOCUMENTO DE ID \"{((filtro != null) ? new long?(filtro.Id) : null)}\"" : ""), (filtro != null) ? filtro.Id : 0, (TipoTela)6, "TIPO: " + ((filtro != null) ? ValidationHelper.GetDescription((Enum)(object)filtro.Tipo) : null) + ((filtro == null || filtro.Id != 0) ? $"\nID APÓLICE: {((filtro != null) ? new long?(filtro.Id) : null)}" : ""));
+ }
+
+ private void ContentLoad()
+ {
+ //IL_0024: Unknown result type (might be due to invalid IL or missing references)
+ //IL_002e: Expected O, but got Unknown
+ //IL_003b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0045: Expected O, but got Unknown
+ ArquivoGrid.CellEditEnding += ArquivoGrid_CellEditEnding;
+ ((UIElement)DocumentoBox).LostFocus += new RoutedEventHandler(DocumentBox_OnLostFocus);
+ ((UIElement)DocumentoBox).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
+ }
+
+ private static void SomenteNumeros(object sender, TextCompositionEventArgs e)
+ {
+ Regex regex = new Regex("[^0-9]+");
+ ((RoutedEventArgs)e).Handled = regex.IsMatch(e.Text);
+ }
+
+ private static void DocumentBox_OnLostFocus(object sender, RoutedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ TextBox val = (TextBox)sender;
+ if (!(val.Text == string.Empty))
+ {
+ val.Text = ValidationHelper.FormatDocument(val.Text);
+ }
+ }
+
+ private void ArquivoGrid_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Invalid comparison between Unknown and I4
+ //IL_0081: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0087: Expected O, but got Unknown
+ if ((int)e.EditAction != 1)
+ {
+ return;
+ }
+ DataGridColumn column = e.Column;
+ DataGridBoundColumn val = (DataGridBoundColumn)(object)((column is DataGridBoundColumn) ? column : null);
+ if (val == null)
+ {
+ return;
+ }
+ BindingBase binding = val.Binding;
+ BindingBase obj = ((binding is Binding) ? binding : null);
+ if (((obj != null) ? ((Binding)obj).Path.Path : null) != "Descricao")
+ {
+ return;
+ }
+ int index = e.Row.GetIndex();
+ FrameworkElement editingElement = e.EditingElement;
+ TextBox val2 = (TextBox)(object)((editingElement is TextBox) ? editingElement : null);
+ if (val2 != null)
+ {
+ val2.Text = val2.Text.ToUpper();
+ IndiceArquivoDigital val3 = (IndiceArquivoDigital)((ItemsControl)ArquivoGrid).Items[index];
+ if (!(val3.Descricao == val2.Text))
+ {
+ ((DomainBase)val3).Initialize();
+ val3.Descricao = val2.Text;
+ ViewModel.Editar(val3);
+ }
+ }
+ }
+
+ private void Baixar_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
+ Button val = (Button)((sender is Button) ? sender : null);
+ if (val != null)
+ {
+ DataGrid val2 = Extentions.FindVisualAncestor<DataGrid>((DependencyObject)(object)val);
+ IndiceArquivoDigital arquivo = (IndiceArquivoDigital)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ ViewModel.Baixar(arquivo);
+ }
+ }
+
+ private async void BaixarTodos_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Activated = false;
+ if (await ViewModel.BaixarTodos())
+ {
+ await ViewModel.ShowMessage("ARQUIVOS BAIXADOS COM SUCESSO!");
+ }
+ ViewModel.Activated = true;
+ }
+
+ private void Abrir_OnClick(object sender, RoutedEventArgs e)
+ {
+ //IL_003a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0040: Expected O, but got Unknown
+ Button val = (Button)((sender is Button) ? sender : null);
+ if (val != null)
+ {
+ ViewModel.Activated = false;
+ DataGrid val2 = Extentions.FindVisualAncestor<DataGrid>((DependencyObject)(object)val);
+ IndiceArquivoDigital arquivo = (IndiceArquivoDigital)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ ViewModel.Baixar(arquivo, abrir: true);
+ ViewModel.Activated = true;
+ }
+ }
+
+ private async void Excluir_OnClick(object sender, RoutedEventArgs e)
+ {
+ Button val = (Button)((sender is Button) ? sender : null);
+ if (val == null)
+ {
+ return;
+ }
+ DataGrid val2 = Extentions.FindVisualAncestor<DataGrid>((DependencyObject)(object)val);
+ IndiceArquivoDigital arquivo = (IndiceArquivoDigital)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ if (arquivo != null)
+ {
+ ViewModel.VerificarEnables(((DomainBase)arquivo).Id);
+ if (!ViewModel.EnableExcluir)
+ {
+ await ViewModel.ShowMessage("VOCÊ NÃO TEM PERMISSÃO PARA EXCLUIR ARQUIVO DIGITAL DO TIPO " + ValidationHelper.GetDescription((Enum)(object)Filtro.Tipo) + "!");
+ }
+ else if (arquivo.NaoExcluir)
+ {
+ await ViewModel.ShowMessage("O ARQUIVO " + arquivo.Descricao + " NÃO PODE SER EXCLUÍDO!");
+ }
+ else if (await ViewModel.ShowMessage("DESEJA REALMENTE EXCLUIR O ARQUIVO " + arquivo.Descricao, "SIM", "NÃO"))
+ {
+ await ViewModel.Excluir(arquivo);
+ }
+ }
+ }
+
+ private void CopyTelefoneToClipBoard_Click(object sender, RoutedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ //IL_002a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0030: Expected O, but got Unknown
+ Button val = (Button)sender;
+ ListBox val2 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val);
+ ClienteTelefone val3 = (ClienteTelefone)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ (((TelefoneBase)val3).Prefixo + ((TelefoneBase)val3).Numero).CopyToClipboard();
+ Toggle("COPIADO - " + ((TelefoneBase)val3).Prefixo + ValidationHelper.OnlyNumber(((TelefoneBase)val3).Numero));
+ }
+
+ private async void WhatsAppMessage_Click(object sender, RoutedEventArgs e)
+ {
+ if (ViewModel.Restricao((TipoRestricao)32))
+ {
+ await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ESSE MENU.");
+ return;
+ }
+ Button val = (Button)sender;
+ ListBox val2 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val);
+ ClienteTelefone val3 = (ClienteTelefone)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ if (!((((TelefoneBase)val3).Tipo.HasValue && (int)((TelefoneBase)val3).Tipo.GetValueOrDefault() == 8) ? (((TelefoneBase)val3).Prefixo + ((TelefoneBase)val3).Numero).Clear() : ("55" + ((TelefoneBase)val3).Prefixo + ((TelefoneBase)val3).Numero.Clear())).EnviarWhatsapp())
+ {
+ await ViewModel.ShowMessage("HOUVE UM PROBLEMA AO ABRIR LINK DO WHATSAPP, O LINK FOI COPIADO EM SUA MAQUINA, BASTA ABRIR O NAVEGADOR DE INTERNET E COLAR NA BARRA DE ENDEREÇOS");
+ }
+ }
+
+ private void DeleteArquivo_OnDeleteClick(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<ListBox>((DependencyObject)(object)val);
+ ArquivoDigital val3 = (ArquivoDigital)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ if (val3 != null)
+ {
+ ViewModel.Delete(val3);
+ }
+ }
+ }
+
+ private void AnexarArquivos_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Anexar();
+ }
+
+ private async void SalvarAnexos_OnClick(object sender, RoutedEventArgs e)
+ {
+ await ViewModel.SalvarAnexos();
+ }
+
+ private async void EnviarPorWhatsApp_OnClick(object sender, RoutedEventArgs e)
+ {
+ if (ViewModel.Restricao((TipoRestricao)32))
+ {
+ await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ACESSAR O WHATSAPP");
+ return;
+ }
+ Button val = (Button)sender;
+ if (((FrameworkElement)val).DataContext != null)
+ {
+ object dataContext = ((FrameworkElement)val).DataContext;
+ ClienteTelefone val2 = (ClienteTelefone)((dataContext is ClienteTelefone) ? dataContext : null);
+ if (val2 != null && !((((TelefoneBase)val2).Tipo.HasValue && (int)((TelefoneBase)val2).Tipo.GetValueOrDefault() == 8) ? (((TelefoneBase)val2).Prefixo + ((TelefoneBase)val2).Numero).Clear() : ("55" + ((TelefoneBase)val2).Prefixo + ((TelefoneBase)val2).Numero.Clear())).EnviarWhatsapp(ViewModel.Anotacoes))
+ {
+ await ViewModel.ShowMessage("HOUVE UM PROBLEMA AO ABRIR LINK DO WHATSAPP, O LINK FOI COPIADO EM SUA MAQUINA, BASTA ABRIR O NAVEGADOR DE INTERNET E COLAR NA BARRA DE ENDEREÇOS");
+ }
+ }
+ }
+
+ private void LimparLista_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.LimparAnexos();
+ }
+
+ private void AlteraEventoEnviarOnClick(MenuItem enviarMenu, bool adiciona = true)
+ {
+ //IL_001e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0028: Expected O, but got Unknown
+ //IL_000b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0015: Expected O, but got Unknown
+ if (adiciona)
+ {
+ enviarMenu.Click += new RoutedEventHandler(Enviar_OnClick);
+ }
+ else
+ {
+ enviarMenu.Click -= new RoutedEventHandler(Enviar_OnClick);
+ }
+ }
+
+ private async void Enviar_OnClick(object sender, RoutedEventArgs e)
+ {
+ MenuItem enviarMenu = (MenuItem)sender;
+ AlteraEventoEnviarOnClick(enviarMenu, adiciona: false);
+ if (ViewModel.Restricao((TipoRestricao)60))
+ {
+ await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ASSINATURA.\nCONTINUANDO COM O ENVIO APENAS.");
+ }
+ else if (ViewModel.ArquivosTela.Any((IndiceArquivoDigital x) => x.Assinar))
+ {
+ if (LicenseHelper.Produtos.All((Licenca x) => (int)x.Produto != 86))
+ {
+ string arguments = new Token().Encrypt(string.Format("{0}:{1}:{2}:{3}", ApplicationHelper.NumeroSerial, ApplicationHelper.IdFornecedor, ((DomainBase)Recursos.Usuario).Id, ApplicationHelper.Beta ? "1" : "0"));
+ ((Window)new DownloadWindow(new Parameters
+ {
+ Beta = ApplicationHelper.Beta,
+ Type = 8,
+ Application = "Assinador.Application.exe",
+ Directory = "Assinador.Application",
+ Arguments = arguments,
+ Run = true
+ })).Show();
+ AlteraEventoEnviarOnClick(enviarMenu);
+ return;
+ }
+ if (!(await ViewModel.EnviarParaAssinatura()))
+ {
+ AlteraEventoEnviarOnClick(enviarMenu);
+ return;
+ }
+ }
+ MalaDireta val = await ViewModel.PrepararEnvio();
+ if (val == null)
+ {
+ AlteraEventoEnviarOnClick(enviarMenu);
+ return;
+ }
+ if (Funcoes.IsWindowOpen<HosterWindow>("ENVIO DE E-MAIL"))
+ {
+ Funcoes.Destroy<HosterWindow>("ENVIO DE E-MAIL");
+ }
+ ((Window)new HosterWindow((ContentControl)(object)new MalaDiretaView(new List<MalaDireta> { val }, ViewModel.Assunto, ViewModel.Corpo, Filtro), "ENVIO DE E-MAIL", 1200.0, 600.0, canMaximize: true)).Show();
+ AlteraEventoEnviarOnClick(enviarMenu);
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ private void AlteraEventoAssinarOnClick(Button assinarButton, bool adiciona = true)
+ {
+ //IL_001e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0028: Expected O, but got Unknown
+ //IL_000b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0015: Expected O, but got Unknown
+ if (adiciona)
+ {
+ ((ButtonBase)assinarButton).Click += new RoutedEventHandler(Assinar_OnClick);
+ }
+ else
+ {
+ ((ButtonBase)assinarButton).Click -= new RoutedEventHandler(Assinar_OnClick);
+ }
+ }
+
+ private async void Assinar_OnClick(object sender, RoutedEventArgs e)
+ {
+ Button assinarButton = (Button)sender;
+ AlteraEventoAssinarOnClick(assinarButton, adiciona: false);
+ if (ViewModel.Restricao((TipoRestricao)60))
+ {
+ await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ASSINATURA.");
+ AlteraEventoAssinarOnClick(assinarButton);
+ }
+ else if (LicenseHelper.Produtos.All((Licenca x) => (int)x.Produto != 86))
+ {
+ string arguments = new Token().Encrypt(string.Format("{0}:{1}:{2}:{3}", ApplicationHelper.NumeroSerial, ApplicationHelper.IdFornecedor, ((DomainBase)Recursos.Usuario).Id, ApplicationHelper.Beta ? "1" : "0"));
+ ((Window)new DownloadWindow(new Parameters
+ {
+ Beta = ApplicationHelper.Beta,
+ Type = 8,
+ Application = "Assinador.Application.exe",
+ Directory = "Assinador.Application",
+ Arguments = arguments,
+ Run = true
+ })).Show();
+ AlteraEventoAssinarOnClick(assinarButton);
+ }
+ else
+ {
+ await ViewModel.EnviarParaAssinatura();
+ AlteraEventoAssinarOnClick(assinarButton);
+ }
+ }
+
+ private void TextBoxBase_OnTextChanged(object sender, TextChangedEventArgs e)
+ {
+ //IL_000f: Unknown result type (might be due to invalid IL or missing references)
+ string text = ((TextBox)sender).Text;
+ if (text.Length < 3)
+ {
+ ViewModel.ArquivosTela = ViewModel.Arquivos;
+ return;
+ }
+ List<IndiceArquivoDigital> list = ViewModel.Arquivos.Where((IndiceArquivoDigital x) => x.Descricao.Contains(text)).ToList();
+ if (list.Count > 0)
+ {
+ ViewModel.ArquivosTela = new ObservableCollection<IndiceArquivoDigital>();
+ list.ForEach(delegate(IndiceArquivoDigital x)
+ {
+ ViewModel.ArquivosTela.Add(x);
+ });
+ }
+ else
+ {
+ ViewModel.ArquivosTela = new ObservableCollection<IndiceArquivoDigital>();
+ }
+ }
+
+ private async void PopupBox_OnOpened(object sender, RoutedEventArgs e)
+ {
+ if (ViewModel.Telefones.Count == 0)
+ {
+ ViewModel.Telefones.Add(new ClienteTelefone
+ {
+ Prefixo = Recursos.Empresa.PrimeiroPrefixo,
+ Numero = Recursos.Empresa.PrimeiroTelefone
+ });
+ }
+ IndiceArquivoDigital indice = (IndiceArquivoDigital)((FrameworkElement)(PopupBox)sender).DataContext;
+ ArquivoDigitalViewModel viewModel = ViewModel;
+ viewModel.Anotacoes = await CreateWhatsappMessage(indice);
+ }
+
+ private async Task<string> CreateWhatsappMessage(IndiceArquivoDigital indice)
+ {
+ StringBuilder links = new StringBuilder((await ViewModel.CreateLink(indice)).ToString());
+ StringBuilder assinaturas = new StringBuilder(indice.Assinado ? "" : (indice.EnviadoAssinatura ? ("LINK PARA ASSINATURA" + Environment.NewLine + indice.UrlAssinatura + Environment.NewLine + Environment.NewLine) : ""));
+ foreach (IndiceArquivoDigital indiceArquivoDigital in ViewModel.Arquivos)
+ {
+ if (indiceArquivoDigital.Selecionado && indiceArquivoDigital.IdArquivoDigital != indice.IdArquivoDigital)
+ {
+ if (links.Length > 0)
+ {
+ links.AppendLine("\r\n");
+ assinaturas.AppendLine();
+ }
+ StringBuilder stringBuilder = links;
+ stringBuilder.AppendLine((await ViewModel.CreateLink(indiceArquivoDigital)).ToString());
+ assinaturas.AppendLine(indiceArquivoDigital.Assinado ? "" : (indiceArquivoDigital.EnviadoAssinatura ? ("LINK PARA ASSINATURA" + Environment.NewLine + indiceArquivoDigital.UrlAssinatura + Environment.NewLine + Environment.NewLine) : ""));
+ }
+ }
+ return ViewModel.CarregarMensagem().Replace("[*LINK*]", $"LINK(S) PARA BAIXAR O(S) DOCUMENTO(S) (VÁLIDO(S) POR 7 DIAS){Environment.NewLine}{links}").Replace("<|LINKASSINATURA|>", assinaturas.ToString());
+ }
+
+ private void CopiarLinkAssinatura_OnClick(object sender, RoutedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_000b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0011: Expected O, but got Unknown
+ IndiceArquivoDigital val = (IndiceArquivoDigital)((FrameworkElement)(Button)sender).DataContext;
+ if (val != null && !string.IsNullOrWhiteSpace(val.UrlAssinatura))
+ {
+ val.UrlAssinatura.CopyToClipboard();
+ Toggle("LINK COPIADO - " + val.UrlAssinatura);
+ }
+ }
+
+ private void SnackbarMessage_ActionClick(object sender, RoutedEventArgs e)
+ {
+ SnackbarArquivoDigital.IsActive = false;
+ }
+
+ public void Toggle(string message, bool active = true)
+ {
+ ((ContentControl)SnackbarArquivoDigital.Message).Content = message;
+ SnackbarArquivoDigital.IsActive = active;
+ if (active)
+ {
+ Task.Factory.StartNew(CloseSlackBar);
+ }
+ }
+
+ private void CloseSlackBar()
+ {
+ Thread.Sleep(5000);
+ Dispatcher dispatcher = ((DispatcherObject)App.ProgressRing).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)4, (Delegate)(Action)delegate
+ {
+ Toggle("", active: false);
+ });
+ }
+ }
+
+ public void ScrollViewer_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0006: Unknown result type (might be due to invalid IL or missing references)
+ ScrollViewer val = (ScrollViewer)sender;
+ val.ScrollToVerticalOffset(val.VerticalOffset - (double)e.Delta);
+ ((RoutedEventArgs)e).Handled = true;
+ }
+
+ private void Log_OnClick(object sender, RoutedEventArgs e)
+ {
+ //IL_0011: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0017: Expected O, but got Unknown
+ Button val = (Button)((sender is Button) ? sender : null);
+ if (val != null)
+ {
+ IndiceArquivoDigital val2 = (IndiceArquivoDigital)((FrameworkElement)val).DataContext;
+ if (val2 != null && ((DomainBase)val2).Id != 0L)
+ {
+ ViewModel.AbrirLog((TipoTela)6, ((DomainBase)val2).Id);
+ }
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/arquivodigitaldrawer.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_0072: Unknown result type (might be due to invalid IL or missing references)
+ //IL_007e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0088: Expected O, but got Unknown
+ //IL_008b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0095: Expected O, but got Unknown
+ //IL_0097: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a3: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ad: Expected O, but got Unknown
+ //IL_00b0: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ba: Expected O, but got Unknown
+ //IL_00bc: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00c8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00d2: Expected O, but got Unknown
+ //IL_00d5: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00df: Expected O, but got Unknown
+ //IL_00e1: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ed: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00f7: Expected O, but got Unknown
+ //IL_00f9: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0105: Unknown result type (might be due to invalid IL or missing references)
+ //IL_010f: Expected O, but got Unknown
+ //IL_0111: Unknown result type (might be due to invalid IL or missing references)
+ //IL_011d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0127: Expected O, but got Unknown
+ //IL_012a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0134: Expected O, but got Unknown
+ //IL_0136: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0142: Unknown result type (might be due to invalid IL or missing references)
+ //IL_014c: Expected O, but got Unknown
+ //IL_014e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_015a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0164: Expected O, but got Unknown
+ //IL_0166: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0172: Unknown result type (might be due to invalid IL or missing references)
+ //IL_017c: Expected O, but got Unknown
+ //IL_017f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0189: Expected O, but got Unknown
+ //IL_018b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0197: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01a1: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ ((UIElement)(ScrollViewer)target).PreviewMouseWheel += new MouseWheelEventHandler(ScrollViewer_PreviewMouseWheel);
+ break;
+ case 2:
+ ProgressBar = (ProgressBar)target;
+ break;
+ case 3:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 4:
+ TitleBox = (TextBlock)target;
+ break;
+ case 7:
+ ((TextBoxBase)(TextBox)target).TextChanged += new TextChangedEventHandler(TextBoxBase_OnTextChanged);
+ break;
+ case 8:
+ ArquivoGrid = (DataGrid)target;
+ break;
+ case 16:
+ ((MenuItem)target).Click += new RoutedEventHandler(AnexarArquivos_OnClick);
+ break;
+ case 17:
+ ((MenuItem)target).Click += new RoutedEventHandler(BaixarTodos_OnClick);
+ break;
+ case 18:
+ ((MenuItem)target).Click += new RoutedEventHandler(Enviar_OnClick);
+ break;
+ case 19:
+ DocumentoBox = (TextBox)target;
+ break;
+ case 20:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Assinar_OnClick);
+ break;
+ case 22:
+ ((MenuItem)target).Click += new RoutedEventHandler(SalvarAnexos_OnClick);
+ break;
+ case 23:
+ ((MenuItem)target).Click += new RoutedEventHandler(LimparLista_OnClick);
+ break;
+ case 24:
+ SnackbarArquivoDigital = (Snackbar)target;
+ break;
+ case 25:
+ ((SnackbarMessage)target).ActionClick += new RoutedEventHandler(SnackbarMessage_ActionClick);
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IStyleConnector.Connect(int connectionId, object target)
+ {
+ //IL_004e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_005a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0064: Expected O, but got Unknown
+ //IL_0066: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0072: Unknown result type (might be due to invalid IL or missing references)
+ //IL_007c: Expected O, but got Unknown
+ //IL_007e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_008a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0094: Expected O, but got Unknown
+ //IL_0096: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a2: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ac: Expected O, but got Unknown
+ //IL_00ae: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ba: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00c4: Expected O, but got Unknown
+ //IL_00c6: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00d2: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00dc: Expected O, but got Unknown
+ //IL_00de: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ea: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00f4: Expected O, but got Unknown
+ //IL_00f6: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0102: Unknown result type (might be due to invalid IL or missing references)
+ //IL_010c: Expected O, but got Unknown
+ //IL_010e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_011a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0124: Expected O, but got Unknown
+ //IL_0126: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0132: Unknown result type (might be due to invalid IL or missing references)
+ //IL_013c: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 5:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(CopyTelefoneToClipBoard_Click);
+ break;
+ case 6:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(WhatsAppMessage_Click);
+ break;
+ case 9:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(CopiarLinkAssinatura_OnClick);
+ break;
+ case 10:
+ ((PopupBox)target).Opened += new RoutedEventHandler(PopupBox_OnOpened);
+ break;
+ case 11:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(EnviarPorWhatsApp_OnClick);
+ break;
+ case 12:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Abrir_OnClick);
+ break;
+ case 13:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Baixar_OnClick);
+ break;
+ case 14:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Log_OnClick);
+ break;
+ case 15:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Excluir_OnClick);
+ break;
+ case 21:
+ ((Chip)target).DeleteClick += new RoutedEventHandler(DeleteArquivo_OnDeleteClick);
+ break;
+ case 7:
+ case 8:
+ case 16:
+ case 17:
+ case 18:
+ case 19:
+ case 20:
+ break;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/ExpedicaoDrawer.cs b/Decompiler/Gestor.Application.Drawers/ExpedicaoDrawer.cs
new file mode 100644
index 0000000..831c5e0
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/ExpedicaoDrawer.cs
@@ -0,0 +1,289 @@
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+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 System.Windows.Threading;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Application.Views.Generic;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Generic;
+using Gestor.Model.Domain.Seguros;
+using MaterialDesignThemes.Wpf;
+
+namespace Gestor.Application.Drawers;
+
+public class ExpedicaoDrawer : BaseUserControl, IComponentConnector
+{
+ internal ProgressBar ProgressBar;
+
+ internal TextBox DocumentoBox;
+
+ internal TextBox DestinoBox;
+
+ internal DatePicker EnvioBox;
+
+ internal DatePicker RecebimentoBox;
+
+ internal TextBox ResponsavelBox;
+
+ internal DataGrid ExpedicaoGrid;
+
+ internal Snackbar Snackbar;
+
+ private bool _contentLoaded;
+
+ public ExpedicaoViewModel ViewModel { get; set; }
+
+ public ExpedicaoDrawer(Documento documento)
+ {
+ ViewModel = new ExpedicaoViewModel(documento);
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ Dispatcher dispatcher = ((DispatcherObject)this).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)7, (Delegate)new Action(ContentLoad));
+ }
+ }
+
+ private void ContentLoad()
+ {
+ //IL_000d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0017: Expected O, but got Unknown
+ //IL_0024: Unknown result type (might be due to invalid IL or missing references)
+ //IL_002e: Expected O, but got Unknown
+ //IL_003b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0045: Expected O, but got Unknown
+ //IL_0052: Unknown result type (might be due to invalid IL or missing references)
+ //IL_005c: Expected O, but got Unknown
+ ((UIElement)EnvioBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((UIElement)EnvioBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
+ ((UIElement)RecebimentoBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((UIElement)RecebimentoBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
+ }
+
+ private void Incluir_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Incluir();
+ }
+
+ private void Alterar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Alterar(alterar: true);
+ }
+
+ private async void Salvar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Carregando = true;
+ List<KeyValuePair<string, string>> list = await ViewModel.Salvar();
+ ((CollectionView)((ItemsControl)ExpedicaoGrid).Items).Refresh();
+ bool num = list == null || list.Count == 0;
+ ViewModel.Carregando = false;
+ if (num)
+ {
+ ToggleSnackBar("EXPEDIÇÃO SALVA COM SUCESSO");
+ }
+ else
+ {
+ await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK");
+ }
+ }
+
+ private void Cancelar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CancelarAlteracao();
+ }
+
+ private async void Excluir_OnClick(object sender, RoutedEventArgs e)
+ {
+ if (await ViewModel.Excluir())
+ {
+ ToggleSnackBar("EXPEDIÇÃO EXCLUÍDA COM SUCESSO");
+ }
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ private void SnackbarMessage_ActionClick(object sender, RoutedEventArgs e)
+ {
+ Snackbar.IsActive = false;
+ }
+
+ public void ToggleSnackBar(string message, bool active = true)
+ {
+ ((ContentControl)Snackbar.Message).Content = message;
+ Snackbar.IsActive = active;
+ if (active)
+ {
+ Task.Factory.StartNew(CloseSlackBar);
+ }
+ }
+
+ private void CloseSlackBar()
+ {
+ Thread.Sleep(5000);
+ Dispatcher dispatcher = ((DispatcherObject)ProgressBar).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)4, (Delegate)(Action)delegate
+ {
+ ToggleSnackBar("", active: false);
+ });
+ }
+ }
+
+ private void Log_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.AbrirLog((TipoTela)46, ((DomainBase)ViewModel.SelectedExpedicao).Id);
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/expedicaodrawer.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_004f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0059: Expected O, but got Unknown
+ //IL_005b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0067: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0071: Expected O, but got Unknown
+ //IL_0073: Unknown result type (might be due to invalid IL or missing references)
+ //IL_007f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0089: Expected O, but got Unknown
+ //IL_008b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0097: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a1: Expected O, but got Unknown
+ //IL_00a3: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00af: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b9: Expected O, but got Unknown
+ //IL_00bb: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00c7: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00d1: Expected O, but got Unknown
+ //IL_00d3: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00df: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00e9: Expected O, but got Unknown
+ //IL_00eb: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00f7: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0101: Expected O, but got Unknown
+ //IL_0104: Unknown result type (might be due to invalid IL or missing references)
+ //IL_010e: Expected O, but got Unknown
+ //IL_0111: Unknown result type (might be due to invalid IL or missing references)
+ //IL_011b: Expected O, but got Unknown
+ //IL_011e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0128: Expected O, but got Unknown
+ //IL_0135: Unknown result type (might be due to invalid IL or missing references)
+ //IL_013f: Expected O, but got Unknown
+ //IL_014c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0156: Expected O, but got Unknown
+ //IL_0163: Unknown result type (might be due to invalid IL or missing references)
+ //IL_016d: Expected O, but got Unknown
+ //IL_0170: Unknown result type (might be due to invalid IL or missing references)
+ //IL_017a: Expected O, but got Unknown
+ //IL_0187: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0191: Expected O, but got Unknown
+ //IL_019e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01a8: Expected O, but got Unknown
+ //IL_01b5: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01bf: Expected O, but got Unknown
+ //IL_01c2: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01cc: Expected O, but got Unknown
+ //IL_01cf: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01d9: Expected O, but got Unknown
+ //IL_01dc: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01e6: Expected O, but got Unknown
+ //IL_01e8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01f4: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01fe: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ ProgressBar = (ProgressBar)target;
+ break;
+ case 2:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 3:
+ ((MenuItem)target).Click += new RoutedEventHandler(Incluir_OnClick);
+ break;
+ case 4:
+ ((MenuItem)target).Click += new RoutedEventHandler(Alterar_OnClick);
+ break;
+ case 5:
+ ((MenuItem)target).Click += new RoutedEventHandler(Salvar_OnClick);
+ break;
+ case 6:
+ ((MenuItem)target).Click += new RoutedEventHandler(Cancelar_OnClick);
+ break;
+ case 7:
+ ((MenuItem)target).Click += new RoutedEventHandler(Excluir_OnClick);
+ break;
+ case 8:
+ ((MenuItem)target).Click += new RoutedEventHandler(Log_OnClick);
+ break;
+ case 9:
+ DocumentoBox = (TextBox)target;
+ break;
+ case 10:
+ DestinoBox = (TextBox)target;
+ break;
+ case 11:
+ EnvioBox = (DatePicker)target;
+ ((UIElement)EnvioBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((UIElement)EnvioBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
+ ((Control)EnvioBox).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick);
+ break;
+ case 12:
+ RecebimentoBox = (DatePicker)target;
+ ((UIElement)RecebimentoBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((UIElement)RecebimentoBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
+ ((Control)RecebimentoBox).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick);
+ break;
+ case 13:
+ ResponsavelBox = (TextBox)target;
+ break;
+ case 14:
+ ExpedicaoGrid = (DataGrid)target;
+ break;
+ case 15:
+ Snackbar = (Snackbar)target;
+ break;
+ case 16:
+ ((SnackbarMessage)target).ActionClick += new RoutedEventHandler(SnackbarMessage_ActionClick);
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/ExtratosDrawer.cs b/Decompiler/Gestor.Application.Drawers/ExtratosDrawer.cs
new file mode 100644
index 0000000..1dd3f48
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/ExtratosDrawer.cs
@@ -0,0 +1,246 @@
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Input;
+using System.Windows.Markup;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Application.Views.Generic;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Relatorios.ClientesAtivosInativos;
+using Gestor.Model.Domain.Seguros;
+using MaterialDesignThemes.Wpf;
+
+namespace Gestor.Application.Drawers;
+
+public class ExtratosDrawer : BaseUserControl, IComponentConnector
+{
+ internal ProgressBar ProgressBar;
+
+ internal StackPanel Tipo;
+
+ internal StackPanel Cliente;
+
+ internal ToggleButton ClienteToggle;
+
+ internal StackPanel Documento;
+
+ internal StackPanel Endosso;
+
+ internal StackPanel Item;
+
+ internal StackPanel Perfil;
+
+ internal Snackbar Snackbar;
+
+ private bool _contentLoaded;
+
+ public ExtratosViewModel ViewModel { get; set; }
+
+ private static List<Documento> Documentos { get; set; }
+
+ private static List<Prospeccao> Prospeccoes { get; set; }
+
+ private static List<long> Selecionados { get; set; }
+
+ private static List<long> SelecionadosPros { get; set; }
+
+ private static List<ClientesAtivosInativos> Clientes { get; set; }
+
+ private static Relatorio? TipoRelatorio { get; set; }
+
+ public ExtratosDrawer(List<ClientesAtivosInativos> clientes = null, List<Documento> documentos = null, Relatorio? tipoRelatorio = null, List<long> selecionados = null, List<long> selecionadosPros = null, List<Prospeccao> prospeccaos = null)
+ {
+ //IL_004a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_004f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0050: Unknown result type (might be due to invalid IL or missing references)
+ //IL_006a: Expected I4, but got Unknown
+ //IL_0108: Unknown result type (might be due to invalid IL or missing references)
+ Documentos = documentos;
+ Prospeccoes = prospeccaos;
+ Selecionados = selecionados;
+ Clientes = clientes;
+ TipoRelatorio = tipoRelatorio;
+ SelecionadosPros = selecionadosPros;
+ ViewModel = new ExtratosViewModel
+ {
+ TipoDeRelatorio = tipoRelatorio
+ };
+ switch (tipoRelatorio)
+ {
+ case 2L:
+ case 4L:
+ ViewModel.TipoExtratoEnabled = false;
+ ViewModel.SelectedTipoExtrato = (TipoExtrato)1;
+ ViewModel.ClientePorPaginaVisibility = (Visibility)0;
+ ViewModel.SelecionarItensVisibility = (Visibility)2;
+ break;
+ case null:
+ ViewModel.TipoExtratoEnabled = true;
+ ViewModel.ClientePorPaginaVisibility = (Visibility)2;
+ break;
+ case 0L:
+ ViewModel.TipoExtratoEnabled = false;
+ ViewModel.SelectedTipoExtrato = (TipoExtrato)0;
+ ViewModel.SelecionarItensVisibility = (Visibility)2;
+ break;
+ default:
+ ViewModel.SelectedTipoExtrato = (TipoExtrato)1;
+ ViewModel.SelecionarItensVisibility = (Visibility)2;
+ ViewModel.SelecionarItensVisibility = (Visibility)2;
+ break;
+ }
+ if ((int)ViewModel.SelectedTipoExtrato == 0)
+ {
+ ViewModel.EsconderResumido = true;
+ ViewModel.ClienteVisibility = true;
+ }
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ }
+
+ private async void Gerar_OnClick(object sender, RoutedEventArgs e)
+ {
+ if (Clientes != null)
+ {
+ await ViewModel.PrepararExtrato(Clientes, null, null, TipoRelatorio);
+ }
+ else if (Documentos != null || Prospeccoes != null)
+ {
+ await ViewModel.PrepararExtrato(null, Documentos, Prospeccoes, TipoRelatorio, Selecionados, SelecionadosPros);
+ }
+ }
+
+ private async void GerarPDF_OnClick(object sender, RoutedEventArgs e)
+ {
+ if (Clientes != null)
+ {
+ await ViewModel.PrepararExtrato(Clientes, null, null, TipoRelatorio, null, null, pdf: true);
+ }
+ else if (Documentos != null || Prospeccoes != null)
+ {
+ await ViewModel.PrepararExtrato(null, Documentos, Prospeccoes, TipoRelatorio, Selecionados, SelecionadosPros, pdf: true);
+ }
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ private void SnackbarMessage_ActionClick(object sender, RoutedEventArgs e)
+ {
+ Snackbar.IsActive = false;
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/extratosdrawer.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_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_005f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0069: Expected O, but got Unknown
+ //IL_006b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0077: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0081: Expected O, but got Unknown
+ //IL_0084: Unknown result type (might be due to invalid IL or missing references)
+ //IL_008e: Expected O, but got Unknown
+ //IL_0091: Unknown result type (might be due to invalid IL or missing references)
+ //IL_009b: Expected O, but got Unknown
+ //IL_009e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a8: Expected O, but got Unknown
+ //IL_00ab: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b5: Expected O, but got Unknown
+ //IL_00b8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00c2: Expected O, but got Unknown
+ //IL_00c5: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00cf: Expected O, but got Unknown
+ //IL_00d2: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00dc: Expected O, but got Unknown
+ //IL_00de: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ea: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00f4: Expected O, but got Unknown
+ //IL_00f6: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0102: Unknown result type (might be due to invalid IL or missing references)
+ //IL_010c: Expected O, but got Unknown
+ //IL_010f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0119: Expected O, but got Unknown
+ //IL_011b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0127: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0131: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ ((UIElement)(ScrollViewer)target).PreviewMouseWheel += new MouseWheelEventHandler(base.ScrollViewer_PreviewMouseWheel);
+ break;
+ case 2:
+ ProgressBar = (ProgressBar)target;
+ break;
+ case 3:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 4:
+ Tipo = (StackPanel)target;
+ break;
+ case 5:
+ Cliente = (StackPanel)target;
+ break;
+ case 6:
+ ClienteToggle = (ToggleButton)target;
+ break;
+ case 7:
+ Documento = (StackPanel)target;
+ break;
+ case 8:
+ Endosso = (StackPanel)target;
+ break;
+ case 9:
+ Item = (StackPanel)target;
+ break;
+ case 10:
+ Perfil = (StackPanel)target;
+ break;
+ case 11:
+ ((MenuItem)target).Click += new RoutedEventHandler(Gerar_OnClick);
+ break;
+ case 12:
+ ((MenuItem)target).Click += new RoutedEventHandler(GerarPDF_OnClick);
+ break;
+ case 13:
+ Snackbar = (Snackbar)target;
+ break;
+ case 14:
+ ((SnackbarMessage)target).ActionClick += new RoutedEventHandler(SnackbarMessage_ActionClick);
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/ImpostoDrawer.cs b/Decompiler/Gestor.Application.Drawers/ImpostoDrawer.cs
new file mode 100644
index 0000000..99f9755
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/ImpostoDrawer.cs
@@ -0,0 +1,274 @@
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Markup;
+using System.Windows.Threading;
+using Gestor.Application.Helpers;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Generic;
+using MaterialDesignThemes.Wpf;
+
+namespace Gestor.Application.Drawers;
+
+public class ImpostoDrawer : UserControl, IComponentConnector
+{
+ private readonly int _tipo;
+
+ private readonly long _id;
+
+ internal ProgressBar ProgressBar;
+
+ internal TextBlock TitleBox;
+
+ internal ComboBox SeguradoraBox;
+
+ internal ComboBox SeguradoraAlternativaBox;
+
+ internal ComboBox RamoBox;
+
+ internal DataGrid ArquivoGrid;
+
+ internal Snackbar SnackbarImposto;
+
+ private bool _contentLoaded;
+
+ public ImpostoViewModel ViewModel { get; set; }
+
+ public ImpostoDrawer(int tipo, long id)
+ {
+ _tipo = tipo;
+ _id = id;
+ ViewModel = new ImpostoViewModel();
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ Dispatcher dispatcher = ((DispatcherObject)this).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)7, (Delegate)new Action(ContentLoad));
+ }
+ }
+
+ private async void ContentLoad()
+ {
+ ViewModel.Carregando = true;
+ await ViewModel.Carregar(_tipo, _id);
+ ((Selector)SeguradoraBox).SelectionChanged += new SelectionChangedEventHandler(Indice_OnSelectionChanged);
+ ((Selector)SeguradoraAlternativaBox).SelectionChanged += new SelectionChangedEventHandler(Indice_OnSelectionChanged);
+ ((Selector)RamoBox).SelectionChanged += new SelectionChangedEventHandler(Indice_OnSelectionChanged);
+ ViewModel.Carregando = false;
+ }
+
+ private void SnackbarMessage_ActionClick(object sender, RoutedEventArgs e)
+ {
+ SnackbarImposto.IsActive = false;
+ }
+
+ public void Toggle(string message, bool active = true)
+ {
+ ((ContentControl)SnackbarImposto.Message).Content = message;
+ SnackbarImposto.IsActive = active;
+ if (active)
+ {
+ Task.Factory.StartNew(CloseSlackBar);
+ }
+ }
+
+ private void CloseSlackBar()
+ {
+ Thread.Sleep(5000);
+ Dispatcher dispatcher = ((DispatcherObject)App.ProgressRing).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)4, (Delegate)(Action)delegate
+ {
+ Toggle("", active: false);
+ });
+ }
+ }
+
+ private async void Status_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ ListBox val = (ListBox)sender;
+ if (((Selector)val).SelectedItem != null)
+ {
+ ViewModel.Ativo = ((((Selector)val).SelectedIndex == 0) ? new bool?(true) : ((((Selector)val).SelectedIndex == 1) ? new bool?(false) : null));
+ TitleBox.Text = ((((Selector)val).SelectedIndex == 0) ? "IMPOSTOS ATIVOS" : ((((Selector)val).SelectedIndex == 1) ? "IMPOSTOS INATIVOS" : "TODOS IMPOSTOS"));
+ await ViewModel.Carregar(0L);
+ }
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ private void Incluir_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Incluir();
+ }
+
+ private void Alterar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.AlterarImposto();
+ }
+
+ private async void Salvar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Carregando = true;
+ List<KeyValuePair<string, string>> list = await ViewModel.Salvar();
+ ((DependencyObject)(object)this).ValidateFields(list);
+ bool num = list == null || list.Count == 0;
+ ViewModel.Carregando = false;
+ if (num)
+ {
+ Toggle("PARÂMETRO SALVO COM SUCESSO.");
+ }
+ else
+ {
+ await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK");
+ }
+ }
+
+ private async void Cancelar_OnClick(object sender, RoutedEventArgs e)
+ {
+ await ViewModel.Cancelar();
+ }
+
+ private void Log_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.AbrirLog((TipoTela)56, ((DomainBase)ViewModel.SelectedImposto).Id);
+ }
+
+ private async void Indice_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ if (!ViewModel.Carregando)
+ {
+ ViewModel.Carregando = true;
+ await ViewModel.Carregar(0L);
+ ViewModel.Carregando = false;
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/impostodrawer.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_004b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0055: Expected O, but got Unknown
+ //IL_0057: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0063: Unknown result type (might be due to invalid IL or missing references)
+ //IL_006d: Expected O, but got Unknown
+ //IL_006f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_007b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0085: Expected O, but got Unknown
+ //IL_0088: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0092: Expected O, but got Unknown
+ //IL_0095: Unknown result type (might be due to invalid IL or missing references)
+ //IL_009f: Expected O, but got Unknown
+ //IL_00a2: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ac: Expected O, but got Unknown
+ //IL_00af: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b9: Expected O, but got Unknown
+ //IL_00bb: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00c7: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00d1: Expected O, but got Unknown
+ //IL_00d3: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00df: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00e9: Expected O, but got Unknown
+ //IL_00eb: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00f7: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0101: Expected O, but got Unknown
+ //IL_0103: Unknown result type (might be due to invalid IL or missing references)
+ //IL_010f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0119: Expected O, but got Unknown
+ //IL_011b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0127: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0131: Expected O, but got Unknown
+ //IL_0134: Unknown result type (might be due to invalid IL or missing references)
+ //IL_013e: Expected O, but got Unknown
+ //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
+ switch (connectionId)
+ {
+ case 1:
+ ProgressBar = (ProgressBar)target;
+ break;
+ case 2:
+ ((Selector)(ListBox)target).SelectionChanged += new SelectionChangedEventHandler(Status_OnSelectionChanged);
+ break;
+ case 3:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 4:
+ TitleBox = (TextBlock)target;
+ break;
+ case 5:
+ SeguradoraBox = (ComboBox)target;
+ break;
+ case 6:
+ SeguradoraAlternativaBox = (ComboBox)target;
+ break;
+ case 7:
+ RamoBox = (ComboBox)target;
+ break;
+ case 8:
+ ((MenuItem)target).Click += new RoutedEventHandler(Incluir_OnClick);
+ break;
+ case 9:
+ ((MenuItem)target).Click += new RoutedEventHandler(Alterar_OnClick);
+ break;
+ case 10:
+ ((MenuItem)target).Click += new RoutedEventHandler(Salvar_OnClick);
+ break;
+ case 11:
+ ((MenuItem)target).Click += new RoutedEventHandler(Cancelar_OnClick);
+ break;
+ case 12:
+ ((MenuItem)target).Click += new RoutedEventHandler(Log_OnClick);
+ break;
+ case 13:
+ ArquivoGrid = (DataGrid)target;
+ break;
+ case 14:
+ SnackbarImposto = (Snackbar)target;
+ break;
+ case 15:
+ ((SnackbarMessage)target).ActionClick += new RoutedEventHandler(SnackbarMessage_ActionClick);
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/InclusaoArquivoDigitalDrawer.cs b/Decompiler/Gestor.Application.Drawers/InclusaoArquivoDigitalDrawer.cs
new file mode 100644
index 0000000..eb909b1
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/InclusaoArquivoDigitalDrawer.cs
@@ -0,0 +1,182 @@
+using System;
+using System.CodeDom.Compiler;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Markup;
+using System.Windows.Threading;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Common;
+using MaterialDesignThemes.Wpf;
+using Xceed.Wpf.AvalonDock.Controls;
+
+namespace Gestor.Application.Drawers;
+
+public class InclusaoArquivoDigitalDrawer : UserControl, IComponentConnector, IStyleConnector
+{
+ internal ProgressBar ProgressBar;
+
+ internal Snackbar SnackbarArquivoDigital;
+
+ private bool _contentLoaded;
+
+ public TarefaDrawerViewModel ViewModel { get; set; }
+
+ public InclusaoArquivoDigitalDrawer(TarefaDrawerViewModel viewModel)
+ {
+ ViewModel = viewModel;
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ ViewModel.RegistrarAcao("ACESSOU ANEXO ARQUIVO DIGITAL", 0L, (TipoTela)6);
+ }
+
+ private void DeleteArquivo_OnDeleteClick(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<ListBox>((DependencyObject)(object)val);
+ ArquivoDigital val3 = (ArquivoDigital)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ if (val3 != null)
+ {
+ ViewModel.Delete(val3);
+ }
+ }
+ }
+
+ private void AnexarArquivos_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Anexar();
+ }
+
+ private void SalvarAnexos_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.SalvarAnexos();
+ ViewModel.CloseDrawer();
+ }
+
+ private void LimparLista_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.LimparAnexos();
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ private void SnackbarMessage_ActionClick(object sender, RoutedEventArgs e)
+ {
+ SnackbarArquivoDigital.IsActive = false;
+ }
+
+ public void Toggle(string message, bool active = true)
+ {
+ ((ContentControl)SnackbarArquivoDigital.Message).Content = message;
+ SnackbarArquivoDigital.IsActive = active;
+ if (active)
+ {
+ Task.Factory.StartNew(CloseSlackBar);
+ }
+ }
+
+ private void CloseSlackBar()
+ {
+ Thread.Sleep(5000);
+ Dispatcher dispatcher = ((DispatcherObject)App.ProgressRing).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)4, (Delegate)(Action)delegate
+ {
+ Toggle("", active: false);
+ });
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/inclusaoarquivodigitaldrawer.xaml", UriKind.Relative);
+ Application.LoadComponent((object)this, uri);
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IComponentConnector.Connect(int connectionId, object target)
+ {
+ //IL_002f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0039: Expected O, but got Unknown
+ //IL_003b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0047: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0051: Expected O, but got Unknown
+ //IL_0053: Unknown result type (might be due to invalid IL or missing references)
+ //IL_005f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0069: Expected O, but got Unknown
+ //IL_006b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0077: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0081: Expected O, but got Unknown
+ //IL_0083: Unknown result type (might be due to invalid IL or missing references)
+ //IL_008f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0099: Expected O, but got Unknown
+ //IL_009c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a6: Expected O, but got Unknown
+ //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b4: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00be: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ ProgressBar = (ProgressBar)target;
+ break;
+ case 2:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 3:
+ ((MenuItem)target).Click += new RoutedEventHandler(AnexarArquivos_OnClick);
+ break;
+ case 5:
+ ((MenuItem)target).Click += new RoutedEventHandler(SalvarAnexos_OnClick);
+ break;
+ case 6:
+ ((MenuItem)target).Click += new RoutedEventHandler(LimparLista_OnClick);
+ break;
+ case 7:
+ SnackbarArquivoDigital = (Snackbar)target;
+ break;
+ case 8:
+ ((SnackbarMessage)target).ActionClick += new RoutedEventHandler(SnackbarMessage_ActionClick);
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IStyleConnector.Connect(int connectionId, object target)
+ {
+ //IL_0005: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0011: Unknown result type (might be due to invalid IL or missing references)
+ //IL_001b: Expected O, but got Unknown
+ if (connectionId == 4)
+ {
+ ((Chip)target).DeleteClick += new RoutedEventHandler(DeleteArquivo_OnDeleteClick);
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/InfoDrawer.cs b/Decompiler/Gestor.Application.Drawers/InfoDrawer.cs
new file mode 100644
index 0000000..0d8eb03
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/InfoDrawer.cs
@@ -0,0 +1,196 @@
+using System;
+using System.CodeDom.Compiler;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Markup;
+using Gestor.Application.Helpers;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Application.Views.Generic;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Common;
+using Gestor.Model.Domain.Generic;
+using Gestor.Model.Domain.Seguros;
+using MaterialDesignThemes.Wpf;
+using Xceed.Wpf.AvalonDock.Controls;
+
+namespace Gestor.Application.Drawers;
+
+public class InfoDrawer : BaseUserControl, IComponentConnector, IStyleConnector
+{
+ internal ProgressBar ProgressBar;
+
+ internal DataGrid ParcelaGrid;
+
+ internal DataGridTextColumn ParcelasValorColumn;
+
+ internal DataGridTextColumn ParcelasRealizadoColumn;
+
+ internal DataGridTextColumn ParcelasComissaoColumn;
+
+ internal DataGridTextColumn ParcelasReciboColumn;
+
+ internal DataGrid ItemGrid;
+
+ internal Snackbar Snackbar;
+
+ private bool _contentLoaded;
+
+ public InfoViewModel ViewModel { get; set; }
+
+ public InfoDrawer(Documento documento, bool ocultarInfos = false)
+ {
+ ViewModel = new InfoViewModel(documento, ocultarInfos);
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ ViewModel.RegistrarAcao("ACESSOU INFORMAÇÕES" + ((documento == null || ((DomainBase)documento).Id != 0) ? $" DO DOCUMENTO DE ID \"{((documento != null) ? new long?(((DomainBase)documento).Id) : null)}\"" : ""), (documento != null) ? ((DomainBase)documento).Id : 0, (TipoTela)2, ViewModel.GerarObs(documento));
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ private void SnackbarMessage_ActionClick(object sender, RoutedEventArgs e)
+ {
+ Snackbar.IsActive = false;
+ }
+
+ private void CopyTelefoneToClipBoard_Click(object sender, RoutedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ //IL_002a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0030: Expected O, but got Unknown
+ Button val = (Button)sender;
+ ListBox val2 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val);
+ Contato val3 = (Contato)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ val3.Numero.CopyToClipboard();
+ ViewModel.ToggleSnackBar("COPIADO - " + val3.Numero);
+ }
+
+ private async void WhatsAppMessage_Click(object sender, RoutedEventArgs e)
+ {
+ if (ViewModel.Restricao((TipoRestricao)32))
+ {
+ await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ACESSAR O WHATSAPP");
+ return;
+ }
+ Button val = (Button)sender;
+ ListBox val2 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val);
+ Contato val3 = (Contato)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ if (!("55" + val3.Numero.Clear()).EnviarWhatsapp())
+ {
+ await ViewModel.ShowMessage("HOUVE UM PROBLEMA AO ABRIR LINK DO WHATSAPP, O LINK FOI COPIADO EM SUA MAQUINA, BASTA ABRIR O NAVEGADOR DE INTERNET E COLAR NA BARRA DE ENDEREÇOS");
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/infodrawer.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_003f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0049: Expected O, but got Unknown
+ //IL_004b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0057: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0061: Expected O, but got Unknown
+ //IL_0064: Unknown result type (might be due to invalid IL or missing references)
+ //IL_006e: Expected O, but got Unknown
+ //IL_0071: Unknown result type (might be due to invalid IL or missing references)
+ //IL_007b: Expected O, but got Unknown
+ //IL_007e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0088: Expected O, but got Unknown
+ //IL_008b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0095: Expected O, but got Unknown
+ //IL_0098: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a2: Expected O, but got Unknown
+ //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00af: Expected O, but got Unknown
+ //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
+ switch (connectionId)
+ {
+ case 1:
+ ProgressBar = (ProgressBar)target;
+ break;
+ case 2:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 5:
+ ParcelaGrid = (DataGrid)target;
+ break;
+ case 6:
+ ParcelasValorColumn = (DataGridTextColumn)target;
+ break;
+ case 7:
+ ParcelasRealizadoColumn = (DataGridTextColumn)target;
+ break;
+ case 8:
+ ParcelasComissaoColumn = (DataGridTextColumn)target;
+ break;
+ case 9:
+ ParcelasReciboColumn = (DataGridTextColumn)target;
+ break;
+ case 10:
+ ItemGrid = (DataGrid)target;
+ break;
+ case 11:
+ Snackbar = (Snackbar)target;
+ break;
+ case 12:
+ ((SnackbarMessage)target).ActionClick += new RoutedEventHandler(SnackbarMessage_ActionClick);
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IStyleConnector.Connect(int connectionId, object target)
+ {
+ //IL_000a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0016: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0020: Expected O, but got Unknown
+ //IL_0022: Unknown result type (might be due to invalid IL or missing references)
+ //IL_002e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0038: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 3:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(CopyTelefoneToClipBoard_Click);
+ break;
+ case 4:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(WhatsAppMessage_Click);
+ break;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/LogDrawer.cs b/Decompiler/Gestor.Application.Drawers/LogDrawer.cs
new file mode 100644
index 0000000..544485c
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/LogDrawer.cs
@@ -0,0 +1,92 @@
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Markup;
+using Assinador.Infrastructure.Helpers;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Application.Views.Generic;
+using Gestor.Model.Common;
+
+namespace Gestor.Application.Drawers;
+
+public class LogDrawer : BaseUserControl, IComponentConnector
+{
+ private bool _contentLoaded;
+
+ public LogViewModel ViewModel { get; set; }
+
+ public LogDrawer(TipoTela tela, long id, List<long> parcelas = null, int numParcela = 0)
+ {
+ //IL_0007: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0028: Unknown result type (might be due to invalid IL or missing references)
+ //IL_004c: Unknown result type (might be due to invalid IL or missing references)
+ ViewModel = new LogViewModel(tela, id, parcelas, numParcela);
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ string description = Functions.GetDescription((Enum)(object)tela);
+ ViewModel.RegistrarAcao($"ACESSOU LOG DE ALTERAÇÕES DE {description} DO ID \"{id}\"", id, tela, $"ID ENTIDADE: {id}\nTIPO: {description}");
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ private void MostrarCampos_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.MostrarCampos();
+ }
+
+ private void Imprimir_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Imprimir();
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/logdrawer.xaml", UriKind.Relative);
+ Application.LoadComponent((object)this, uri);
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IComponentConnector.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_0047: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0053: Unknown result type (might be due to invalid IL or missing references)
+ //IL_005d: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 2:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Imprimir_OnClick);
+ break;
+ case 3:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(MostrarCampos_OnClick);
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/LogEmailDrawer.cs b/Decompiler/Gestor.Application.Drawers/LogEmailDrawer.cs
new file mode 100644
index 0000000..d3d581d
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/LogEmailDrawer.cs
@@ -0,0 +1,80 @@
+using System;
+using System.CodeDom.Compiler;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Markup;
+using Assinador.Infrastructure.Helpers;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Application.Views.Generic;
+using Gestor.Model.Common;
+
+namespace Gestor.Application.Drawers;
+
+public class LogEmailDrawer : BaseUserControl, IComponentConnector
+{
+ private bool _contentLoaded;
+
+ public LogEmailViewModel ViewModel { get; set; }
+
+ public LogEmailDrawer(TipoTela tela, long id, bool singleMode = false)
+ {
+ //IL_0007: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0031: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0048: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0059: Unknown result type (might be due to invalid IL or missing references)
+ ViewModel = new LogEmailViewModel(tela, id, singleMode);
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ ViewModel.RegistrarAcao($"ACESSOU LOG DE E-MAIL DE {Functions.GetDescription((Enum)(object)tela)} DO ID \"{id}\"", id, tela, $"ID ENTIDADE: {id}\nTIPO: {Functions.GetDescription((Enum)(object)tela)}");
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ private void Imprimir_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Imprimir();
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/logemaildrawer.xaml", UriKind.Relative);
+ Application.LoadComponent((object)this, uri);
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IComponentConnector.Connect(int connectionId, object target)
+ {
+ //IL_000b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0017: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0021: Expected O, but got Unknown
+ //IL_0023: Unknown result type (might be due to invalid IL or missing references)
+ //IL_002f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0039: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 2:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Imprimir_OnClick);
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/LogSistemaAntigo.cs b/Decompiler/Gestor.Application.Drawers/LogSistemaAntigo.cs
new file mode 100644
index 0000000..cc8c54e
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/LogSistemaAntigo.cs
@@ -0,0 +1,71 @@
+using System;
+using System.CodeDom.Compiler;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Markup;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Model.Common;
+
+namespace Gestor.Application.Drawers;
+
+public class LogSistemaAntigo : UserControl, IComponentConnector
+{
+ private readonly LogSistemaAntigoViewModel _viewModel;
+
+ private bool _contentLoaded;
+
+ public LogSistemaAntigo(long id, string log)
+ {
+ _viewModel = new LogSistemaAntigoViewModel();
+ ((FrameworkElement)this).DataContext = _viewModel;
+ InitializeComponent();
+ _viewModel.Descricao = $"LOG DO DOCUMENTO {id}";
+ _viewModel.Log = log;
+ _viewModel.RegistrarAcao($"ACESSOU LOG DO SISTEMA ANTIGO DO ID \"{id}\"", id, (TipoTela)2, $"ID ENTIDADE: {id}");
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ _viewModel.CloseDrawer();
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/logsistemaantigo.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_0005: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0011: Unknown result type (might be due to invalid IL or missing references)
+ //IL_001b: Expected O, but got Unknown
+ if (connectionId == 1)
+ {
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ }
+ else
+ {
+ _contentLoaded = true;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/LogUtilizacaoDrawer.cs b/Decompiler/Gestor.Application.Drawers/LogUtilizacaoDrawer.cs
new file mode 100644
index 0000000..51b58f2
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/LogUtilizacaoDrawer.cs
@@ -0,0 +1,70 @@
+using System;
+using System.CodeDom.Compiler;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Markup;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Common;
+
+namespace Gestor.Application.Drawers;
+
+public class LogUtilizacaoDrawer : UserControl, IComponentConnector
+{
+ private readonly LogAcaoViewModel _viewModel;
+
+ private bool _contentLoaded;
+
+ public LogUtilizacaoDrawer(RegistroAcao registro, Relatorio relatorio)
+ {
+ //IL_0008: Unknown result type (might be due to invalid IL or missing references)
+ _viewModel = new LogAcaoViewModel(registro, relatorio);
+ ((FrameworkElement)this).DataContext = _viewModel;
+ InitializeComponent();
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ _viewModel.CloseDrawer();
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/logutilizacaodrawer.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_0005: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0011: Unknown result type (might be due to invalid IL or missing references)
+ //IL_001b: Expected O, but got Unknown
+ if (connectionId == 1)
+ {
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ }
+ else
+ {
+ _contentLoaded = true;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/MetaSeguradoraView.cs b/Decompiler/Gestor.Application.Drawers/MetaSeguradoraView.cs
new file mode 100644
index 0000000..3151de6
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/MetaSeguradoraView.cs
@@ -0,0 +1,226 @@
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Markup;
+using System.Windows.Threading;
+using Gestor.Application.Componentes;
+using Gestor.Application.Helpers;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Application.Views.Generic;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Generic;
+using Gestor.Model.Domain.Seguros;
+using MaterialDesignThemes.Wpf;
+
+namespace Gestor.Application.Drawers;
+
+public class MetaSeguradoraView : BaseUserControl, IComponentConnector
+{
+ internal ProgressBar ProgressBar;
+
+ internal CustomItemValidation FaturaField;
+
+ internal DataGrid MetasGrid;
+
+ internal Snackbar Snackbar;
+
+ private bool _contentLoaded;
+
+ public MetaSeguradoraViewModel ViewModel { get; set; }
+
+ public MetaSeguradoraView(Seguradora seguradora)
+ {
+ ViewModel = new MetaSeguradoraViewModel(seguradora);
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ ViewModel.RegistrarAcao("ACESSOU METAS DE VENDA DA SEGURADORA \"" + seguradora.Nome + "\"", ((DomainBase)seguradora).Id, (TipoTela)31, $"ID: {((DomainBase)seguradora).Id}");
+ }
+
+ private void Incluir_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Incluir();
+ }
+
+ private void Alterar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Alterar(alterar: true);
+ }
+
+ private async void Salvar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Carregando = true;
+ List<KeyValuePair<string, string>> list = await ViewModel.Salvar();
+ ((CollectionView)((ItemsControl)MetasGrid).Items).Refresh();
+ ((DependencyObject)(object)this).ValidateFields(list);
+ bool num = list == null || list.Count == 0;
+ ViewModel.Carregando = false;
+ if (num)
+ {
+ ToggleSnackBar("META DE VENDA SALVA COM SUCESSO");
+ }
+ else
+ {
+ await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK");
+ }
+ }
+
+ private void Cancelar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CancelarAlteracao();
+ }
+
+ private async void Excluir_OnClick(object sender, RoutedEventArgs e)
+ {
+ if (await ViewModel.Excluir())
+ {
+ ToggleSnackBar("META DE VENDA EXCLUÍDA COM SUCESSO");
+ }
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ private void SnackbarMessage_ActionClick(object sender, RoutedEventArgs e)
+ {
+ Snackbar.IsActive = false;
+ }
+
+ public void ToggleSnackBar(string message, bool active = true)
+ {
+ ((ContentControl)Snackbar.Message).Content = message;
+ Snackbar.IsActive = active;
+ if (active)
+ {
+ Task.Factory.StartNew(CloseSlackBar);
+ }
+ }
+
+ private void CloseSlackBar()
+ {
+ Thread.Sleep(5000);
+ Dispatcher dispatcher = ((DispatcherObject)ProgressBar).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)4, (Delegate)(Action)delegate
+ {
+ ToggleSnackBar("", active: false);
+ });
+ }
+ }
+
+ private void Log_OnClick(object sender, RoutedEventArgs e)
+ {
+ if (ViewModel.SelectedMetaSeguradora != null)
+ {
+ ViewModel.AbrirLog((TipoTela)31, ((DomainBase)ViewModel.SelectedMetaSeguradora).Id);
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/metaseguradoraview.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_003f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0049: Expected O, but got Unknown
+ //IL_004b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0057: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0061: Expected O, but got Unknown
+ //IL_0063: Unknown result type (might be due to invalid IL or missing references)
+ //IL_006f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0079: Expected O, but got Unknown
+ //IL_007b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0087: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0091: Expected O, but got Unknown
+ //IL_0093: Unknown result type (might be due to invalid IL or missing references)
+ //IL_009f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a9: Expected O, but got Unknown
+ //IL_00ab: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00c1: Expected O, but got Unknown
+ //IL_00c3: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00cf: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00d9: Expected O, but got Unknown
+ //IL_00db: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00e7: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00f1: Expected O, but got Unknown
+ //IL_0101: Unknown result type (might be due to invalid IL or missing references)
+ //IL_010b: Expected O, but got Unknown
+ //IL_010e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0118: Expected O, but got Unknown
+ //IL_011a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0126: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0130: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ ProgressBar = (ProgressBar)target;
+ break;
+ case 2:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 3:
+ ((MenuItem)target).Click += new RoutedEventHandler(Incluir_OnClick);
+ break;
+ case 4:
+ ((MenuItem)target).Click += new RoutedEventHandler(Alterar_OnClick);
+ break;
+ case 5:
+ ((MenuItem)target).Click += new RoutedEventHandler(Salvar_OnClick);
+ break;
+ case 6:
+ ((MenuItem)target).Click += new RoutedEventHandler(Cancelar_OnClick);
+ break;
+ case 7:
+ ((MenuItem)target).Click += new RoutedEventHandler(Excluir_OnClick);
+ break;
+ case 8:
+ ((MenuItem)target).Click += new RoutedEventHandler(Log_OnClick);
+ break;
+ case 9:
+ FaturaField = (CustomItemValidation)target;
+ break;
+ case 10:
+ MetasGrid = (DataGrid)target;
+ break;
+ case 11:
+ Snackbar = (Snackbar)target;
+ break;
+ case 12:
+ ((SnackbarMessage)target).ActionClick += new RoutedEventHandler(SnackbarMessage_ActionClick);
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/MetaVendedorView.cs b/Decompiler/Gestor.Application.Drawers/MetaVendedorView.cs
new file mode 100644
index 0000000..f519211
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/MetaVendedorView.cs
@@ -0,0 +1,231 @@
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Markup;
+using System.Windows.Threading;
+using CurrencyTextBoxControl;
+using Gestor.Application.Helpers;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Application.Views.Generic;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Generic;
+using Gestor.Model.Domain.Seguros;
+using MaterialDesignThemes.Wpf;
+
+namespace Gestor.Application.Drawers;
+
+public class MetaVendedorView : BaseUserControl, IComponentConnector
+{
+ internal ProgressBar ProgressBar;
+
+ internal CurrencyTextBox ValorMetaBox;
+
+ internal TextBox AnoBox;
+
+ internal DataGrid MetasGrid;
+
+ internal Snackbar Snackbar;
+
+ private bool _contentLoaded;
+
+ public MetaVendedorViewModel ViewModel { get; set; }
+
+ public MetaVendedorView(Vendedor vendedor)
+ {
+ ViewModel = new MetaVendedorViewModel(vendedor);
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ }
+
+ private void Incluir_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Incluir();
+ }
+
+ private void Alterar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Alterar(alterar: true);
+ }
+
+ private async void Salvar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Carregando = true;
+ List<KeyValuePair<string, string>> list = await ViewModel.Salvar();
+ ((CollectionView)((ItemsControl)MetasGrid).Items).Refresh();
+ ((DependencyObject)(object)this).ValidateFields(list);
+ bool num = list == null || list.Count == 0;
+ ViewModel.Carregando = false;
+ if (num)
+ {
+ ToggleSnackBar("META DE VENDA SALVA COM SUCESSO");
+ }
+ else
+ {
+ await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK");
+ }
+ }
+
+ private void Cancelar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CancelarAlteracao();
+ }
+
+ private async void Excluir_OnClick(object sender, RoutedEventArgs e)
+ {
+ if (await ViewModel.Excluir())
+ {
+ ToggleSnackBar("META DE VENDA EXCLUÍDA COM SUCESSO");
+ }
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ private void SnackbarMessage_ActionClick(object sender, RoutedEventArgs e)
+ {
+ Snackbar.IsActive = false;
+ }
+
+ public void ToggleSnackBar(string message, bool active = true)
+ {
+ ((ContentControl)Snackbar.Message).Content = message;
+ Snackbar.IsActive = active;
+ if (active)
+ {
+ Task.Factory.StartNew(CloseSlackBar);
+ }
+ }
+
+ private void CloseSlackBar()
+ {
+ Thread.Sleep(5000);
+ Dispatcher dispatcher = ((DispatcherObject)ProgressBar).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)4, (Delegate)(Action)delegate
+ {
+ ToggleSnackBar("", active: false);
+ });
+ }
+ }
+
+ private void Log_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.AbrirLog((TipoTela)30, ((DomainBase)ViewModel.SelectedMetaVendedor).Id);
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/metavendedorview.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_0043: Unknown result type (might be due to invalid IL or missing references)
+ //IL_004d: Expected O, but got Unknown
+ //IL_004f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_005b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0065: Expected O, but got Unknown
+ //IL_0067: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0073: Unknown result type (might be due to invalid IL or missing references)
+ //IL_007d: Expected O, but got Unknown
+ //IL_007f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_008b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0095: Expected O, but got Unknown
+ //IL_0097: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a3: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ad: Expected O, but got Unknown
+ //IL_00af: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00bb: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00c5: Expected O, but got Unknown
+ //IL_00c7: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00d3: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00dd: Expected O, but got Unknown
+ //IL_00df: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00eb: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00f5: Expected O, but got Unknown
+ //IL_00f8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0102: Expected O, but got Unknown
+ //IL_0105: Unknown result type (might be due to invalid IL or missing references)
+ //IL_010f: Expected O, but got Unknown
+ //IL_0112: Unknown result type (might be due to invalid IL or missing references)
+ //IL_011c: Expected O, but got Unknown
+ //IL_011f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0129: Expected O, but got Unknown
+ //IL_012b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0137: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0141: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ ProgressBar = (ProgressBar)target;
+ break;
+ case 2:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 3:
+ ((MenuItem)target).Click += new RoutedEventHandler(Incluir_OnClick);
+ break;
+ case 4:
+ ((MenuItem)target).Click += new RoutedEventHandler(Alterar_OnClick);
+ break;
+ case 5:
+ ((MenuItem)target).Click += new RoutedEventHandler(Salvar_OnClick);
+ break;
+ case 6:
+ ((MenuItem)target).Click += new RoutedEventHandler(Cancelar_OnClick);
+ break;
+ case 7:
+ ((MenuItem)target).Click += new RoutedEventHandler(Excluir_OnClick);
+ break;
+ case 8:
+ ((MenuItem)target).Click += new RoutedEventHandler(Log_OnClick);
+ break;
+ case 9:
+ ValorMetaBox = (CurrencyTextBox)target;
+ break;
+ case 10:
+ AnoBox = (TextBox)target;
+ break;
+ case 11:
+ MetasGrid = (DataGrid)target;
+ break;
+ case 12:
+ Snackbar = (Snackbar)target;
+ break;
+ case 13:
+ ((SnackbarMessage)target).ActionClick += new RoutedEventHandler(SnackbarMessage_ActionClick);
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/ObservacoesDrawer.cs b/Decompiler/Gestor.Application.Drawers/ObservacoesDrawer.cs
new file mode 100644
index 0000000..20e17db
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/ObservacoesDrawer.cs
@@ -0,0 +1,239 @@
+using System;
+using System.CodeDom.Compiler;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Markup;
+using System.Windows.Threading;
+using Gestor.Application.Helpers;
+using Gestor.Application.Servicos;
+using Gestor.Application.Servicos.Seguros;
+using Gestor.Application.ViewModels.Generic;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Generic;
+
+namespace Gestor.Application.Drawers;
+
+public class ObservacoesDrawer : UserControl, IComponentConnector
+{
+ private readonly BaseSegurosViewModel _viewModel;
+
+ private readonly long _id;
+
+ private TipoTela _tipo;
+
+ private ApoliceServico _apoliceServico;
+
+ private ParcelaServico _parcelaServico;
+
+ private ClienteServico _clienteServico;
+
+ internal Grid GridMainObservacao;
+
+ internal TextBlock Observacaotxt;
+
+ internal TextBox ObservacaoBox;
+
+ private bool _contentLoaded;
+
+ public ObservacoesDrawer(long id, TipoTela tipo)
+ {
+ //IL_004c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_004d: Unknown result type (might be due to invalid IL or missing references)
+ _apoliceServico = new ApoliceServico();
+ _parcelaServico = new ParcelaServico();
+ _clienteServico = new ClienteServico();
+ _viewModel = new BaseSegurosViewModel();
+ ((FrameworkElement)this).DataContext = _viewModel;
+ InitializeComponent();
+ _id = id;
+ _tipo = tipo;
+ double windowHeight = _viewModel.GetWindowHeight();
+ ((FrameworkElement)GridMainObservacao).Height = windowHeight;
+ Dispatcher dispatcher = ((DispatcherObject)this).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)7, (Delegate)new Action(ContentLoad));
+ }
+ }
+
+ private async void ContentLoad()
+ {
+ await LoadObservacao(_id, _tipo, salvar: false);
+ }
+
+ private async Task LoadObservacao(long id, TipoTela tipo, bool salvar)
+ {
+ //IL_001e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_001f: Unknown result type (might be due to invalid IL or missing references)
+ string observacao2 = $"{Recursos.Usuario.Nome}, ID: {((DomainBase)Recursos.Usuario).Id}, {Funcoes.GetNetworkTime():g}{Environment.NewLine}{_viewModel.Anotacoes}{Environment.NewLine}{Environment.NewLine}{ObservacaoBox.Text}";
+ _viewModel.VerificarEnables(id);
+ switch (tipo - 1)
+ {
+ case 0:
+ {
+ Observacaotxt.Text = "OBSERVAÇÃO CLIENTE";
+ TextBox observacaoBox;
+ if (!salvar)
+ {
+ observacaoBox = ObservacaoBox;
+ observacaoBox.Text = (await _clienteServico.BuscarClienteAsync(id)).Observacao;
+ break;
+ }
+ observacaoBox = ObservacaoBox;
+ observacaoBox.Text = await _clienteServico.SalvarObservacoes(_id, observacao2);
+ if (_clienteServico.Sucesso)
+ {
+ ObservacaoBox.Text = observacao2;
+ }
+ break;
+ }
+ case 1:
+ Observacaotxt.Text = "OBSERVAÇÃO APÓLICE";
+ if (!salvar)
+ {
+ TextBox observacaoBox = ObservacaoBox;
+ observacaoBox.Text = (await _apoliceServico.BuscarApoliceAsync(id)).Observacao;
+ break;
+ }
+ observacao2 = await _apoliceServico.Save(_id, observacao2);
+ if (_apoliceServico.Sucesso)
+ {
+ ObservacaoBox.Text = observacao2;
+ }
+ break;
+ case 4:
+ {
+ Observacaotxt.Text = "OBSERVAÇÃO PARCELA";
+ TextBox observacaoBox;
+ if (!salvar)
+ {
+ observacaoBox = ObservacaoBox;
+ observacaoBox.Text = (await _parcelaServico.BuscarParcela(id)).Observacao;
+ break;
+ }
+ observacaoBox = ObservacaoBox;
+ observacaoBox.Text = await _parcelaServico.SalvarObservacoes(_id, observacao2);
+ if (_parcelaServico.Sucesso)
+ {
+ ObservacaoBox.Text = observacao2;
+ }
+ break;
+ }
+ case 2:
+ case 3:
+ break;
+ }
+ }
+
+ private void Alterar_OnClick(object sender, RoutedEventArgs e)
+ {
+ _viewModel.Alterar(alterar: true);
+ }
+
+ private async void Salvar_OnClick(object sender, RoutedEventArgs e)
+ {
+ if (!string.IsNullOrWhiteSpace(_viewModel.Anotacoes))
+ {
+ await LoadObservacao(_id, _tipo, salvar: true);
+ _viewModel.Anotacoes = string.Empty;
+ _viewModel.Alterar(alterar: false);
+ }
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ _viewModel.CloseDrawer();
+ }
+
+ private void Cancelar_OnClick(object sender, RoutedEventArgs e)
+ {
+ _viewModel.Alterar(alterar: false);
+ _viewModel.Anotacoes = string.Empty;
+ }
+
+ private async void ObservacoesDrawer_OnLoaded(object sender, RoutedEventArgs e)
+ {
+ await _viewModel.PermissaoTela((TipoTela)2);
+ _viewModel.Alterar(alterar: false);
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/observacoesdrawer.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_003a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0044: Expected O, but got Unknown
+ //IL_0047: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0051: Expected O, but got Unknown
+ //IL_0053: Unknown result type (might be due to invalid IL or missing references)
+ //IL_005f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0069: Expected O, but got Unknown
+ //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_0090: Unknown result type (might be due to invalid IL or missing references)
+ //IL_009c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a6: Expected O, but got Unknown
+ //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b4: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00be: Expected O, but got Unknown
+ //IL_00c1: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00cb: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ ((FrameworkElement)(ObservacoesDrawer)target).Loaded += new RoutedEventHandler(ObservacoesDrawer_OnLoaded);
+ break;
+ case 2:
+ GridMainObservacao = (Grid)target;
+ break;
+ case 3:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 4:
+ Observacaotxt = (TextBlock)target;
+ break;
+ case 5:
+ ((MenuItem)target).Click += new RoutedEventHandler(Alterar_OnClick);
+ break;
+ case 6:
+ ((MenuItem)target).Click += new RoutedEventHandler(Salvar_OnClick);
+ break;
+ case 7:
+ ((MenuItem)target).Click += new RoutedEventHandler(Cancelar_OnClick);
+ break;
+ case 8:
+ ObservacaoBox = (TextBox)target;
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/PermissaoUsuarioDrawer.cs b/Decompiler/Gestor.Application.Drawers/PermissaoUsuarioDrawer.cs
new file mode 100644
index 0000000..bb9a2da
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/PermissaoUsuarioDrawer.cs
@@ -0,0 +1,738 @@
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+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 System.Windows.Threading;
+using Gestor.Application.Actions;
+using Gestor.Application.Helpers;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Application.Views.Generic;
+using Gestor.Common.Validation;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Generic;
+using Gestor.Model.Domain.Seguros;
+using MaterialDesignThemes.Wpf;
+
+namespace Gestor.Application.Drawers;
+
+public class PermissaoUsuarioDrawer : BaseUserControl, IComponentConnector, IStyleConnector
+{
+ public PermissaoUsuarioViewModel ViewModel;
+
+ private bool _filtrado;
+
+ internal ProgressBar ProgressBar;
+
+ internal ToggleButton AtivoBox;
+
+ internal ScrollViewer ScrollPermissoes;
+
+ internal MenuItem DesativarPermissoes;
+
+ internal MenuItem AtivarPermissoes;
+
+ internal MenuItem MaisOpcoesButton;
+
+ internal DataGrid SegurosGrid;
+
+ internal DataGrid FerramentasGrid;
+
+ internal DataGrid ArquivoDigitalGrid;
+
+ internal MenuItem AtivarRestricoes;
+
+ internal MenuItem DesativarRestricoes;
+
+ internal DataGrid RestricoesBiGrid;
+
+ internal DataGrid RestricoesSegurosGrid;
+
+ internal DataGrid RestricoesRelatoriosGrid;
+
+ internal DataGrid RestricoesCamposRelatoriosGrid;
+
+ internal DataGrid RestricoesTotalizacoesRelatoriosGrid;
+
+ internal DataGrid RestricoesFinanceiroGrid;
+
+ internal DataGrid RestricoesFerramentasGrid;
+
+ internal DataGrid RestricoesAjudaGrid;
+
+ internal Snackbar Snackbar;
+
+ private bool _contentLoaded;
+
+ public PermissaoUsuarioDrawer(Usuario usuario)
+ {
+ ViewModel = new PermissaoUsuarioViewModel(usuario);
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ Gestor.Application.Actions.Actions.OcultarTogglesSeguros = (Action)Delegate.Combine(Gestor.Application.Actions.Actions.OcultarTogglesSeguros, new Action(OcultarTogglesSeguros));
+ Gestor.Application.Actions.Actions.OcultarTogglesFerramentas = (Action)Delegate.Combine(Gestor.Application.Actions.Actions.OcultarTogglesFerramentas, new Action(OcultarTogglesFerramentas));
+ Gestor.Application.Actions.Actions.OcultarTogglesArquivoDigital = (Action)Delegate.Combine(Gestor.Application.Actions.Actions.OcultarTogglesArquivoDigital, new Action(OcultarTogglesArquivoDigital));
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ Gestor.Application.Actions.Actions.AtualizaUsuario?.Invoke();
+ ViewModel.CloseDrawer();
+ }
+
+ private void AutoCompleteBox_Populating(object sender, PopulatingEventArgs e)
+ {
+ if (e.Parameter.Length >= 3)
+ {
+ _filtrado = true;
+ e.Cancel = true;
+ ViewModel.FiltrarRestricoesBi(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate
+ {
+ //IL_0006: Unknown result type (might be due to invalid IL or missing references)
+ ((AutoCompleteBox)sender).PopulateComplete();
+ }, TaskScheduler.FromCurrentSynchronizationContext());
+ ViewModel.FiltrarRestricoesSeguro(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate
+ {
+ //IL_0006: Unknown result type (might be due to invalid IL or missing references)
+ ((AutoCompleteBox)sender).PopulateComplete();
+ }, TaskScheduler.FromCurrentSynchronizationContext());
+ ViewModel.FiltrarRestricoesRelatorio(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate
+ {
+ //IL_0006: Unknown result type (might be due to invalid IL or missing references)
+ ((AutoCompleteBox)sender).PopulateComplete();
+ }, TaskScheduler.FromCurrentSynchronizationContext());
+ ViewModel.FiltrarRestricoesTotalizacoesRelatorio(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate
+ {
+ //IL_0006: Unknown result type (might be due to invalid IL or missing references)
+ ((AutoCompleteBox)sender).PopulateComplete();
+ }, TaskScheduler.FromCurrentSynchronizationContext());
+ ViewModel.FiltrarRestricoesCamposRelatorio(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate
+ {
+ //IL_0006: Unknown result type (might be due to invalid IL or missing references)
+ ((AutoCompleteBox)sender).PopulateComplete();
+ }, TaskScheduler.FromCurrentSynchronizationContext());
+ ViewModel.FiltrarRestricoesFinanceiro(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate
+ {
+ //IL_0006: Unknown result type (might be due to invalid IL or missing references)
+ ((AutoCompleteBox)sender).PopulateComplete();
+ }, TaskScheduler.FromCurrentSynchronizationContext());
+ ViewModel.FiltrarRestricoesFerramenta(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate
+ {
+ //IL_0006: Unknown result type (might be due to invalid IL or missing references)
+ ((AutoCompleteBox)sender).PopulateComplete();
+ }, TaskScheduler.FromCurrentSynchronizationContext());
+ ViewModel.FiltrarRestricoesAjuda(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate
+ {
+ //IL_0006: Unknown result type (might be due to invalid IL or missing references)
+ ((AutoCompleteBox)sender).PopulateComplete();
+ }, TaskScheduler.FromCurrentSynchronizationContext());
+ }
+ }
+
+ private void AutoCompleteBox_OnTextChanged(object sender, RoutedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ if (((AutoCompleteBox)sender).Text.Length < 3 && _filtrado)
+ {
+ _filtrado = false;
+ ViewModel.FiltrarRestricoesBis("");
+ ViewModel.FiltrarRestricoesSeguros("");
+ ViewModel.FiltrarRestricoesRelatorios("");
+ ViewModel.FiltrarRestricoesTotalizacoesRelatorios("");
+ ViewModel.FiltrarRestricoesCamposRelatorios("");
+ ViewModel.FiltrarRestricoesFinanceiros("");
+ ViewModel.FiltrarRestricoesFerramentas("");
+ ViewModel.FiltrarRestricoesAjudas("");
+ }
+ }
+
+ private async void SalvarPermissoes_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Carregando = true;
+ if (await ViewModel.Salvar())
+ {
+ ToggleSnackBar("PERMISSÕES/RESTRIÇÕES SALVAS COM SUCESSO.");
+ }
+ ViewModel.Carregando = false;
+ }
+
+ private async void CopiarUsuario_OnClick(object sender, RoutedEventArgs e)
+ {
+ await AbrirCopiarPermiss();
+ }
+
+ private async void ExportarUsuario_OnClick(object sender, RoutedEventArgs e)
+ {
+ await AbrirExportarPermiss();
+ }
+
+ private async Task AbrirCopiarPermiss()
+ {
+ Tuple<List<PermissaoUsuario>, Usuario, List<RestricaoUsuario>, List<PermissaoArquivoDigital>, List<RestricaoUsuarioCamposRelatorios>> tuple;
+ do
+ {
+ tuple = await ViewModel.ShowCopiarPermissaoDialog();
+ if (tuple == null)
+ {
+ return;
+ }
+ }
+ while (!ViewModel.CopiarPermissoes(tuple));
+ ((CollectionView)((ItemsControl)SegurosGrid).Items).Refresh();
+ ((CollectionView)((ItemsControl)FerramentasGrid).Items).Refresh();
+ ((CollectionView)((ItemsControl)ArquivoDigitalGrid).Items).Refresh();
+ ((CollectionView)((ItemsControl)RestricoesBiGrid).Items).Refresh();
+ ((CollectionView)((ItemsControl)RestricoesSegurosGrid).Items).Refresh();
+ ((CollectionView)((ItemsControl)RestricoesFinanceiroGrid).Items).Refresh();
+ ((CollectionView)((ItemsControl)RestricoesFerramentasGrid).Items).Refresh();
+ ((CollectionView)((ItemsControl)RestricoesRelatoriosGrid).Items).Refresh();
+ ((CollectionView)((ItemsControl)RestricoesTotalizacoesRelatoriosGrid).Items).Refresh();
+ ((CollectionView)((ItemsControl)RestricoesCamposRelatoriosGrid).Items).Refresh();
+ FerramentasGrid.EsconderToggles((TipoTela)18, TipoToggle.Incluir | TipoToggle.Excluir);
+ FerramentasGrid.EsconderToggles((TipoTela)10, TipoToggle.Excluir);
+ FerramentasGrid.EsconderToggles((TipoTela)12, TipoToggle.Incluir | TipoToggle.Excluir);
+ FerramentasGrid.EsconderToggles((TipoTela)13, TipoToggle.Incluir | TipoToggle.Excluir);
+ SegurosGrid.EsconderToggles((TipoTela)21, TipoToggle.Incluir | TipoToggle.Alterar | TipoToggle.Excluir);
+ SegurosGrid.EsconderToggles((TipoTela)5, TipoToggle.Consultar);
+ }
+
+ private async Task AbrirExportarPermiss()
+ {
+ bool num;
+ do
+ {
+ List<Usuario> list = await ViewModel.ShowExportarPermissaoDialog(((DomainBase)ViewModel.SelectedUsuario).Id);
+ if (list == null)
+ {
+ return;
+ }
+ ViewModel.Carregando = true;
+ num = await ViewModel.ExportarPermissoes(list);
+ ViewModel.Carregando = false;
+ }
+ while (!num);
+ ToggleSnackBar("PERMISSÕES/RESTRIÇÕES EXPORTADAS COM SUCESSO.");
+ }
+
+ private void PermissoesGrid_OnPreviewMouseWheel(object sender, MouseWheelEventArgs e)
+ {
+ ScrollPermissoes.ScrollToVerticalOffset(ScrollPermissoes.VerticalOffset - (double)e.Delta);
+ }
+
+ private void AtivarDesativarPermissoes_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.AtivarDesativarPermissoes(ViewModel.AtivarDesativarPermissoesBool);
+ }
+
+ private void AtivarDesativarRestricoes_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.AtivarDesativarRestricoes(ViewModel.AtivarDesativarRestricoesBool);
+ }
+
+ private void UnToggleArquivosDigitais_OnChecked(object sender, RoutedEventArgs e)
+ {
+ //IL_000f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0015: Expected O, but got Unknown
+ //IL_0025: Unknown result type (might be due to invalid IL or missing references)
+ //IL_002f: Expected O, but got Unknown
+ if (ViewModel.Carregado)
+ {
+ DataGridCell val = (DataGridCell)sender;
+ if (val != null)
+ {
+ ViewModel.DesabilitarArquivoDigital((PermissaoArquivoDigital)((FrameworkElement)val).DataContext);
+ }
+ }
+ }
+
+ private void ToggleArquivosDigitais_OnChecked(object sender, RoutedEventArgs e)
+ {
+ //IL_000f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0015: Expected O, but got Unknown
+ //IL_0025: Unknown result type (might be due to invalid IL or missing references)
+ //IL_002f: Expected O, but got Unknown
+ if (ViewModel.Carregado)
+ {
+ DataGridCell val = (DataGridCell)sender;
+ if (val != null)
+ {
+ ViewModel.HabilitarArquivoDigital((PermissaoArquivoDigital)((FrameworkElement)val).DataContext);
+ }
+ }
+ }
+
+ private void UnToggleFerramentas_OnChecked(object sender, RoutedEventArgs e)
+ {
+ //IL_000f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0015: Expected O, but got Unknown
+ //IL_0025: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0034: Expected O, but got Unknown
+ if (ViewModel.Carregado)
+ {
+ DataGridCell val = (DataGridCell)sender;
+ if (val != null)
+ {
+ ViewModel.DesabilitarConsulta((PermissaoUsuario)((FrameworkElement)val).DataContext, "Ferramentas");
+ }
+ }
+ }
+
+ private void ToggleFerramentas_OnChecked(object sender, RoutedEventArgs e)
+ {
+ //IL_000f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0015: Expected O, but got Unknown
+ //IL_0025: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0034: Expected O, but got Unknown
+ if (ViewModel.Carregado)
+ {
+ DataGridCell val = (DataGridCell)sender;
+ if (val != null)
+ {
+ ViewModel.HabilitarConsulta((PermissaoUsuario)((FrameworkElement)val).DataContext, "Ferramentas");
+ }
+ }
+ }
+
+ private void UnToggleSeguros_OnChecked(object sender, RoutedEventArgs e)
+ {
+ //IL_000f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0015: Expected O, but got Unknown
+ //IL_0025: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0034: Expected O, but got Unknown
+ if (ViewModel.Carregado)
+ {
+ DataGridCell val = (DataGridCell)sender;
+ if (val != null)
+ {
+ ViewModel.DesabilitarConsulta((PermissaoUsuario)((FrameworkElement)val).DataContext, "Seguros");
+ }
+ }
+ }
+
+ private void ToggleSeguros_OnChecked(object sender, RoutedEventArgs e)
+ {
+ //IL_000f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0015: Expected O, but got Unknown
+ //IL_0025: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0034: Expected O, but got Unknown
+ if (ViewModel.Carregado)
+ {
+ DataGridCell val = (DataGridCell)sender;
+ if (val != null)
+ {
+ ViewModel.HabilitarConsulta((PermissaoUsuario)((FrameworkElement)val).DataContext, "Seguros");
+ }
+ }
+ }
+
+ private void SnackbarMessage_ActionClick(object sender, RoutedEventArgs e)
+ {
+ Snackbar.IsActive = false;
+ }
+
+ public void ToggleSnackBar(string message, bool active = true)
+ {
+ ((ContentControl)Snackbar.Message).Content = message;
+ Snackbar.IsActive = active;
+ if (active)
+ {
+ Task.Factory.StartNew(CloseSlackBar);
+ }
+ }
+
+ private void CloseSlackBar()
+ {
+ Thread.Sleep(5000);
+ Dispatcher dispatcher = ((DispatcherObject)ProgressBar).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)4, (Delegate)(Action)delegate
+ {
+ ToggleSnackBar("", active: false);
+ });
+ }
+ }
+
+ private static void OcultarTogglesArquivoDigital()
+ {
+ }
+
+ private void OcultarTogglesFerramentas()
+ {
+ FerramentasGrid.EsconderToggles((TipoTela)18, TipoToggle.Incluir | TipoToggle.Excluir);
+ FerramentasGrid.EsconderToggles((TipoTela)10, TipoToggle.Excluir);
+ FerramentasGrid.EsconderToggles((TipoTela)12, TipoToggle.Incluir | TipoToggle.Excluir);
+ FerramentasGrid.EsconderToggles((TipoTela)13, TipoToggle.Excluir);
+ }
+
+ private void OcultarTogglesSeguros()
+ {
+ SegurosGrid.EsconderToggles((TipoTela)21, TipoToggle.Incluir | TipoToggle.Alterar | TipoToggle.Excluir);
+ SegurosGrid.EsconderToggles((TipoTela)5, TipoToggle.Consultar);
+ }
+
+ private void AbrirLogPermissoes_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.AbrirLog((TipoTela)43, ((DomainBase)ViewModel.SelectedUsuario).Id);
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/permissaousuariodrawer.xaml", UriKind.Relative);
+ Application.LoadComponent((object)this, uri);
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IComponentConnector.Connect(int connectionId, object target)
+ {
+ //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b1: Expected O, but got Unknown
+ //IL_00b3: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00bf: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00c9: Expected O, but got Unknown
+ //IL_00cc: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00d6: Expected O, but got Unknown
+ //IL_00d9: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00e3: Expected O, but got Unknown
+ //IL_00e6: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00f0: Expected O, but got Unknown
+ //IL_00fd: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0107: Expected O, but got Unknown
+ //IL_010a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0114: Expected O, but got Unknown
+ //IL_0121: Unknown result type (might be due to invalid IL or missing references)
+ //IL_012b: Expected O, but got Unknown
+ //IL_012e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0138: Expected O, but got Unknown
+ //IL_013a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0146: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0150: Expected O, but got Unknown
+ //IL_0153: Unknown result type (might be due to invalid IL or missing references)
+ //IL_015d: Expected O, but got Unknown
+ //IL_016a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0174: Expected O, but got Unknown
+ //IL_0177: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0181: Expected O, but got Unknown
+ //IL_018e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0198: Expected O, but got Unknown
+ //IL_019b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01a5: Expected O, but got Unknown
+ //IL_01b2: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01bc: Expected O, but got Unknown
+ //IL_01be: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01ca: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01d4: Expected O, but got Unknown
+ //IL_01d5: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01e1: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01eb: Expected O, but got Unknown
+ //IL_01ee: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01f8: Expected O, but got Unknown
+ //IL_0205: Unknown result type (might be due to invalid IL or missing references)
+ //IL_020f: Expected O, but got Unknown
+ //IL_0212: Unknown result type (might be due to invalid IL or missing references)
+ //IL_021c: Expected O, but got Unknown
+ //IL_0229: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0233: Expected O, but got Unknown
+ //IL_0236: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0240: Expected O, but got Unknown
+ //IL_0243: Unknown result type (might be due to invalid IL or missing references)
+ //IL_024d: Expected O, but got Unknown
+ //IL_0250: Unknown result type (might be due to invalid IL or missing references)
+ //IL_025a: Expected O, but got Unknown
+ //IL_025d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0267: Expected O, but got Unknown
+ //IL_0274: Unknown result type (might be due to invalid IL or missing references)
+ //IL_027e: Expected O, but got Unknown
+ //IL_0281: Unknown result type (might be due to invalid IL or missing references)
+ //IL_028b: Expected O, but got Unknown
+ //IL_028e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0298: Expected O, but got Unknown
+ //IL_029b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02a5: Expected O, but got Unknown
+ //IL_02a8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02b2: Expected O, but got Unknown
+ //IL_02b5: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02bf: Expected O, but got Unknown
+ //IL_02c1: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02cd: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02d7: Expected O, but got Unknown
+ //IL_02d9: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02e5: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02ef: Expected O, but got Unknown
+ //IL_02f1: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02fd: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0307: Expected O, but got Unknown
+ //IL_0309: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0315: Unknown result type (might be due to invalid IL or missing references)
+ //IL_031f: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ ProgressBar = (ProgressBar)target;
+ break;
+ case 2:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 3:
+ AtivoBox = (ToggleButton)target;
+ break;
+ case 4:
+ ScrollPermissoes = (ScrollViewer)target;
+ break;
+ case 5:
+ DesativarPermissoes = (MenuItem)target;
+ DesativarPermissoes.Click += new RoutedEventHandler(AtivarDesativarPermissoes_OnClick);
+ break;
+ case 6:
+ AtivarPermissoes = (MenuItem)target;
+ AtivarPermissoes.Click += new RoutedEventHandler(AtivarDesativarPermissoes_OnClick);
+ break;
+ case 7:
+ MaisOpcoesButton = (MenuItem)target;
+ break;
+ case 8:
+ ((MenuItem)target).Click += new RoutedEventHandler(AbrirLogPermissoes_OnClick);
+ break;
+ case 9:
+ SegurosGrid = (DataGrid)target;
+ ((UIElement)SegurosGrid).PreviewMouseWheel += new MouseWheelEventHandler(PermissoesGrid_OnPreviewMouseWheel);
+ break;
+ case 14:
+ FerramentasGrid = (DataGrid)target;
+ ((UIElement)FerramentasGrid).PreviewMouseWheel += new MouseWheelEventHandler(PermissoesGrid_OnPreviewMouseWheel);
+ break;
+ case 19:
+ ArquivoDigitalGrid = (DataGrid)target;
+ ((UIElement)ArquivoDigitalGrid).PreviewMouseWheel += new MouseWheelEventHandler(PermissoesGrid_OnPreviewMouseWheel);
+ break;
+ case 23:
+ ((AutoCompleteBox)target).Populating += new PopulatingEventHandler(AutoCompleteBox_Populating);
+ ((AutoCompleteBox)target).TextChanged += new RoutedEventHandler(AutoCompleteBox_OnTextChanged);
+ break;
+ case 24:
+ AtivarRestricoes = (MenuItem)target;
+ AtivarRestricoes.Click += new RoutedEventHandler(AtivarDesativarRestricoes_OnClick);
+ break;
+ case 25:
+ DesativarRestricoes = (MenuItem)target;
+ DesativarRestricoes.Click += new RoutedEventHandler(AtivarDesativarRestricoes_OnClick);
+ break;
+ case 26:
+ RestricoesBiGrid = (DataGrid)target;
+ break;
+ case 27:
+ RestricoesSegurosGrid = (DataGrid)target;
+ break;
+ case 28:
+ RestricoesRelatoriosGrid = (DataGrid)target;
+ break;
+ case 29:
+ RestricoesCamposRelatoriosGrid = (DataGrid)target;
+ ((UIElement)RestricoesCamposRelatoriosGrid).PreviewMouseWheel += new MouseWheelEventHandler(PermissoesGrid_OnPreviewMouseWheel);
+ break;
+ case 30:
+ RestricoesTotalizacoesRelatoriosGrid = (DataGrid)target;
+ break;
+ case 31:
+ RestricoesFinanceiroGrid = (DataGrid)target;
+ break;
+ case 32:
+ RestricoesFerramentasGrid = (DataGrid)target;
+ break;
+ case 33:
+ RestricoesAjudaGrid = (DataGrid)target;
+ break;
+ case 34:
+ Snackbar = (Snackbar)target;
+ break;
+ case 35:
+ ((SnackbarMessage)target).ActionClick += new RoutedEventHandler(SnackbarMessage_ActionClick);
+ break;
+ case 36:
+ ((MenuItem)target).Click += new RoutedEventHandler(SalvarPermissoes_OnClick);
+ break;
+ case 37:
+ ((MenuItem)target).Click += new RoutedEventHandler(CopiarUsuario_OnClick);
+ break;
+ case 38:
+ ((MenuItem)target).Click += new RoutedEventHandler(ExportarUsuario_OnClick);
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IStyleConnector.Connect(int connectionId, object target)
+ {
+ //IL_003e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0044: Expected O, but got Unknown
+ //IL_0057: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0061: Expected O, but got Unknown
+ //IL_0062: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0073: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0079: Expected O, but got Unknown
+ //IL_008c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0096: Expected O, but got Unknown
+ //IL_0097: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ae: Expected O, but got Unknown
+ //IL_00c1: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00cb: Expected O, but got Unknown
+ //IL_00cc: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00dd: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00e3: Expected O, but got Unknown
+ //IL_00f6: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0100: Expected O, but got Unknown
+ //IL_0101: 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_0118: Expected O, but got Unknown
+ //IL_012b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0135: Expected O, but got Unknown
+ //IL_0136: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0147: Unknown result type (might be due to invalid IL or missing references)
+ //IL_014d: Expected O, but got Unknown
+ //IL_0160: Unknown result type (might be due to invalid IL or missing references)
+ //IL_016a: Expected O, but got Unknown
+ //IL_016b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_017c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0182: Expected O, but got Unknown
+ //IL_0195: Unknown result type (might be due to invalid IL or missing references)
+ //IL_019f: Expected O, but got Unknown
+ //IL_01a0: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01b1: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01b7: Expected O, but got Unknown
+ //IL_01ca: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01d4: Expected O, but got Unknown
+ //IL_01d5: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01e6: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01ec: Expected O, but got Unknown
+ //IL_01ff: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0209: Expected O, but got Unknown
+ //IL_020a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_021b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0221: Expected O, but got Unknown
+ //IL_0234: Unknown result type (might be due to invalid IL or missing references)
+ //IL_023e: Expected O, but got Unknown
+ //IL_023f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0250: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0256: Expected O, but got Unknown
+ //IL_0269: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0273: Expected O, but got Unknown
+ //IL_0274: Unknown result type (might be due to invalid IL or missing references)
+ switch (connectionId)
+ {
+ case 10:
+ {
+ EventSetter val = new EventSetter();
+ val.Event = ToggleButton.UncheckedEvent;
+ val.Handler = (Delegate)new RoutedEventHandler(UnToggleSeguros_OnChecked);
+ ((Collection<SetterBase>)(object)((Style)target).Setters).Add((SetterBase)(object)val);
+ break;
+ }
+ case 11:
+ {
+ EventSetter val = new EventSetter();
+ val.Event = ToggleButton.CheckedEvent;
+ val.Handler = (Delegate)new RoutedEventHandler(ToggleSeguros_OnChecked);
+ ((Collection<SetterBase>)(object)((Style)target).Setters).Add((SetterBase)(object)val);
+ break;
+ }
+ case 12:
+ {
+ EventSetter val = new EventSetter();
+ val.Event = ToggleButton.CheckedEvent;
+ val.Handler = (Delegate)new RoutedEventHandler(ToggleSeguros_OnChecked);
+ ((Collection<SetterBase>)(object)((Style)target).Setters).Add((SetterBase)(object)val);
+ break;
+ }
+ case 13:
+ {
+ EventSetter val = new EventSetter();
+ val.Event = ToggleButton.CheckedEvent;
+ val.Handler = (Delegate)new RoutedEventHandler(ToggleSeguros_OnChecked);
+ ((Collection<SetterBase>)(object)((Style)target).Setters).Add((SetterBase)(object)val);
+ break;
+ }
+ case 15:
+ {
+ EventSetter val = new EventSetter();
+ val.Event = ToggleButton.UncheckedEvent;
+ val.Handler = (Delegate)new RoutedEventHandler(UnToggleFerramentas_OnChecked);
+ ((Collection<SetterBase>)(object)((Style)target).Setters).Add((SetterBase)(object)val);
+ break;
+ }
+ case 16:
+ {
+ EventSetter val = new EventSetter();
+ val.Event = ToggleButton.CheckedEvent;
+ val.Handler = (Delegate)new RoutedEventHandler(ToggleFerramentas_OnChecked);
+ ((Collection<SetterBase>)(object)((Style)target).Setters).Add((SetterBase)(object)val);
+ break;
+ }
+ case 17:
+ {
+ EventSetter val = new EventSetter();
+ val.Event = ToggleButton.CheckedEvent;
+ val.Handler = (Delegate)new RoutedEventHandler(ToggleFerramentas_OnChecked);
+ ((Collection<SetterBase>)(object)((Style)target).Setters).Add((SetterBase)(object)val);
+ break;
+ }
+ case 18:
+ {
+ EventSetter val = new EventSetter();
+ val.Event = ToggleButton.CheckedEvent;
+ val.Handler = (Delegate)new RoutedEventHandler(ToggleFerramentas_OnChecked);
+ ((Collection<SetterBase>)(object)((Style)target).Setters).Add((SetterBase)(object)val);
+ break;
+ }
+ case 20:
+ {
+ EventSetter val = new EventSetter();
+ val.Event = ToggleButton.UncheckedEvent;
+ val.Handler = (Delegate)new RoutedEventHandler(UnToggleArquivosDigitais_OnChecked);
+ ((Collection<SetterBase>)(object)((Style)target).Setters).Add((SetterBase)(object)val);
+ break;
+ }
+ case 21:
+ {
+ EventSetter val = new EventSetter();
+ val.Event = ToggleButton.CheckedEvent;
+ val.Handler = (Delegate)new RoutedEventHandler(ToggleArquivosDigitais_OnChecked);
+ ((Collection<SetterBase>)(object)((Style)target).Setters).Add((SetterBase)(object)val);
+ break;
+ }
+ case 22:
+ {
+ EventSetter val = new EventSetter();
+ val.Event = ToggleButton.CheckedEvent;
+ val.Handler = (Delegate)new RoutedEventHandler(ToggleArquivosDigitais_OnChecked);
+ ((Collection<SetterBase>)(object)((Style)target).Setters).Add((SetterBase)(object)val);
+ break;
+ }
+ case 14:
+ case 19:
+ break;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/TarefaDrawer.cs b/Decompiler/Gestor.Application.Drawers/TarefaDrawer.cs
new file mode 100644
index 0000000..acd4341
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/TarefaDrawer.cs
@@ -0,0 +1,555 @@
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+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 System.Windows.Threading;
+using Gestor.Application.Componentes;
+using Gestor.Application.Helpers;
+using Gestor.Application.Servicos;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Common.Validation;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Common;
+using Gestor.Model.Domain.Configuracoes;
+using Gestor.Model.Domain.Ferramentas;
+using Gestor.Model.Domain.Generic;
+using Gestor.Model.Domain.Seguros;
+using MaterialDesignThemes.Wpf;
+using Xceed.Wpf.AvalonDock.Controls;
+
+namespace Gestor.Application.Drawers;
+
+public class TarefaDrawer : UserControl, IComponentConnector, IStyleConnector
+{
+ internal ProgressBar ProgressBar;
+
+ internal TextBlock TitleBox;
+
+ internal DatePicker AgendamentoBox;
+
+ internal ToggleButton AtivoBox;
+
+ internal RadioButton AnotacoesButton;
+
+ internal RadioButton AnotacoesInternasButton;
+
+ internal WebEditor Anotacoes;
+
+ internal WebEditor Historico;
+
+ internal WebEditor AnotacoesInternas;
+
+ internal WebEditor HistoricoInterno;
+
+ internal DatePicker ConclusaoBox;
+
+ internal ComboBox CboResponsavel;
+
+ internal Snackbar Snackbar;
+
+ private bool _contentLoaded;
+
+ private TarefaDrawerViewModel ViewModel { get; }
+
+ public TarefaDrawer(Tarefa tarefa, bool enableMenu = true)
+ {
+ //IL_0056: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
+ ViewModel = new TarefaDrawerViewModel(tarefa, enableMenu);
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ Dispatcher dispatcher = ((DispatcherObject)this).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)7, (Delegate)new Action(ContentLoad));
+ }
+ ViewModel.RegistrarAcao($"ACESSOU TAREFA DE {((tarefa != null) ? ValidationHelper.GetDescription((Enum)(object)tarefa.Entidade) : null)} DO DOCUMENTO DE ID \"{((tarefa != null) ? new long?(tarefa.IdEntidade) : null)}\"", (tarefa != null) ? tarefa.IdEntidade : 0, (TipoTela)38, string.Format("TIPO DE TAREFA: {0}{1}\nID DOCUMENTO: {2}", (tarefa != null) ? ValidationHelper.GetDescription((Enum)(object)tarefa.Entidade) : null, (tarefa == null || tarefa.IdCliente != 0) ? $"\nID CLIENTE: {((tarefa != null) ? new long?(tarefa.IdCliente) : null)}" : "", (tarefa != null) ? new long?(tarefa.IdEntidade) : null));
+ }
+
+ private void ContentLoad()
+ {
+ //IL_0046: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0050: Expected O, but got Unknown
+ //IL_005d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0067: Expected O, but got Unknown
+ ((ToggleButton)AnotacoesButton).IsChecked = ViewModel.IsAnotacoes;
+ ((ToggleButton)AnotacoesInternasButton).IsChecked = !ViewModel.IsAnotacoes;
+ ((ToggleButton)AnotacoesButton).Checked += new RoutedEventHandler(Anotacoes_OnChecked);
+ ((ToggleButton)AnotacoesInternasButton).Checked += new RoutedEventHandler(AnotacoesInternas_OnChecked);
+ }
+
+ private void Anotacoes_OnChecked(object sender, RoutedEventArgs e)
+ {
+ ViewModel.IsAnotacoes = true;
+ }
+
+ private void AnotacoesInternas_OnChecked(object sender, RoutedEventArgs e)
+ {
+ ViewModel.IsAnotacoes = false;
+ }
+
+ private void Validar()
+ {
+ if (ViewModel.SelectedTarefa != null)
+ {
+ ViewModel.SelectedTarefa.AgendamentoRetroativo = Recursos.Configuracoes.Any((ConfiguracaoSistema x) => (int)x.Configuracao == 45);
+ List<KeyValuePair<string, string>> errorMessages = ViewModel.SelectedTarefa.Validate();
+ ((DependencyObject)(object)this).ValidateFields(errorMessages, focusField: false);
+ }
+ }
+
+ private async void ExcluirTarefa_OnClick(object sender, RoutedEventArgs e)
+ {
+ Grid val = Extentions.FindVisualAncestor<Grid>((DependencyObject)(Button)sender);
+ ListBox val2 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val);
+ Tarefa item = (Tarefa)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ if (!(await ViewModel.ValidaPermissaoParaExcluirTarefa(item)))
+ {
+ await ViewModel.ShowMessage("VOCÊ NÃO TEM PERMISSÃO PARA EXCLUIR ESSA TAREFA");
+ }
+ else if (await ViewModel.Excluir(item))
+ {
+ ToggleSnackBar("TAREFA EXCLUÍDA COM SUCESSO.");
+ }
+ }
+
+ public void ToggleSnackBar(string message, bool active = true)
+ {
+ ((ContentControl)Snackbar.Message).Content = message;
+ Snackbar.IsActive = active;
+ if (active)
+ {
+ Task.Factory.StartNew(CloseSlackBar);
+ }
+ }
+
+ private void CloseSlackBar()
+ {
+ Thread.Sleep(5000);
+ Dispatcher dispatcher = ((DispatcherObject)ProgressBar).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)4, (Delegate)(Action)delegate
+ {
+ ToggleSnackBar("", active: false);
+ });
+ }
+ }
+
+ private void IncluirTarefa_OnClick(object sender, RoutedEventArgs e)
+ {
+ ((ToggleButton)AnotacoesButton).IsChecked = true;
+ Anotacoes.Initialize();
+ AnotacoesInternas.Initialize();
+ ViewModel.Incluir();
+ Validar();
+ }
+
+ private async void MenuList_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ ListBox val = (ListBox)sender;
+ if (((Selector)val).SelectedItem != null)
+ {
+ ViewModel.TituloTarefas = ((Selector)val).SelectedItem.ToString().Replace("System.Windows.Controls.ListBoxItem: ", "");
+ await ViewModel.CarregarTarefas(((Selector)val).SelectedIndex);
+ }
+ }
+
+ private void Status_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ //IL_001f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0025: Invalid comparison between Unknown and I4
+ //IL_0032: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0038: Invalid comparison between Unknown and I4
+ ComboBox val = (ComboBox)sender;
+ if (val != null && ((Selector)val).SelectedItem != null)
+ {
+ ViewModel.Concluido = (int)(StatusTarefa)((Selector)val).SelectedItem == 2;
+ if ((int)(StatusTarefa)((Selector)val).SelectedItem == 2)
+ {
+ ConclusaoBox.SelectedDate = ViewModel.SelectedTarefa.Conclusao ?? Funcoes.GetNetworkTime();
+ }
+ }
+ }
+
+ private async void SalvarTarefa_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Carregando = true;
+ ViewModel.SelectedTarefa.Anotacoes = Anotacoes.GetHtml();
+ ViewModel.SelectedTarefa.AnotacoesInternas = AnotacoesInternas.GetHtml();
+ List<KeyValuePair<string, string>> list = await ViewModel.Salvar(Anotacoes.GetText(), AnotacoesInternas.GetText());
+ bool num = list == null || list.Count == 0;
+ ViewModel.Carregando = false;
+ if (num)
+ {
+ ToggleSnackBar("TAREFA SALVA COM SUCESSO.");
+ ViewModel.Alterar(alterar: false);
+ Anotacoes.Initialize();
+ AnotacoesInternas.Initialize();
+ }
+ else
+ {
+ await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK");
+ }
+ }
+
+ private void SnackbarMessage_ActionClick(object sender, RoutedEventArgs e)
+ {
+ Snackbar.IsActive = false;
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ private void Alterar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.AlterarTarefa();
+ Anotacoes.Initialize();
+ Validar();
+ }
+
+ private void CopyTelefoneToClipBoard_Click(object sender, RoutedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ Button val = (Button)sender;
+ if (((FrameworkElement)val).DataContext != null)
+ {
+ object dataContext = ((FrameworkElement)val).DataContext;
+ TelefoneBase val2 = (TelefoneBase)((dataContext is TelefoneBase) ? dataContext : null);
+ if (val2 != null)
+ {
+ (val2.Prefixo + ValidationHelper.OnlyNumber(val2.Numero)).CopyToClipboard();
+ ToggleSnackBar("COPIADO - " + val2.Prefixo + ValidationHelper.OnlyNumber(val2.Numero));
+ }
+ }
+ }
+
+ private async void WhatsAppMessage_Click(object sender, RoutedEventArgs e)
+ {
+ Button val = (Button)sender;
+ if (((FrameworkElement)val).DataContext != null)
+ {
+ object dataContext = ((FrameworkElement)val).DataContext;
+ TelefoneBase val2 = (TelefoneBase)((dataContext is TelefoneBase) ? dataContext : null);
+ if (val2 != null && !((val2.Tipo.HasValue && (int)val2.Tipo.GetValueOrDefault() == 8) ? (val2.Prefixo + val2.Numero).Clear() : ("55" + val2.Prefixo + val2.Numero.Clear())).EnviarWhatsapp())
+ {
+ await ViewModel.ShowMessage("HOUVE UM PROBLEMA AO ABRIR LINK DO WHATSAPP, O LINK FOI COPIADO EM SUA MAQUINA, BASTA ABRIR O NAVEGADOR DE INTERNET E COLAR NA BARRA DE ENDEREÇOS");
+ }
+ }
+ }
+
+ private async void Cancelar_OnClick(object sender, RoutedEventArgs e)
+ {
+ await ViewModel.Cancelar();
+ Anotacoes.Initialize();
+ AnotacoesInternas.Initialize();
+ }
+
+ private void DatePicker_OnLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0006: Unknown result type (might be due to invalid IL or missing references)
+ DatePicker val = (DatePicker)sender;
+ val.Text = ValidationHelper.FormatDate(val.Text);
+ }
+
+ private void DataAtual_OnDoubleClick(object sender, RoutedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ ((DatePicker)sender).SelectedDate = Funcoes.GetNetworkTime().Date;
+ }
+
+ private void AdicionarResponsavel_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.AdcionarResponsavel();
+ }
+
+ private async void ExcluirResponsavel_OnClick(object sender, RoutedEventArgs e)
+ {
+ Chip chip = (Chip)((sender is Chip) ? sender : null);
+ if (chip == null)
+ {
+ return;
+ }
+ if (!(await ViewModel.ValidaPermissaoParaEditarTarefa()))
+ {
+ await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA EXCLUIR RESPONSÁVEL.");
+ return;
+ }
+ ResponsavelTarefa val = (ResponsavelTarefa)((FrameworkElement)chip).DataContext;
+ if (val != null)
+ {
+ ViewModel.Responsaveis.Remove(val);
+ ViewModel.Usuarios.Add(val.Usuario);
+ ViewModel.Usuarios = new ObservableCollection<Usuario>(ViewModel.Usuarios.OrderBy((Usuario x) => x.Nome));
+ }
+ }
+
+ private async void AnexoTarefa_OnClick(object sender, RoutedEventArgs e)
+ {
+ if (!new PermissaoArquivoDigitalServico().BuscarPermissao(Recursos.Usuario, (TipoArquivoDigital)15).Consultar)
+ {
+ await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ACESSAR\nARQUIVO DIGITAL DE " + ValidationHelper.GetDescription((Enum)(object)(TipoArquivoDigital)15) + ".");
+ return;
+ }
+ Button val = (Button)sender;
+ if (((FrameworkElement)val).DataContext != null)
+ {
+ Tarefa val2 = (Tarefa)((FrameworkElement)val).DataContext;
+ FiltroArquivoDigital filtro = new FiltroArquivoDigital
+ {
+ Id = ((DomainBase)val2).Id,
+ Tipo = (TipoArquivoDigital)15,
+ Parente = val2
+ };
+ ViewModel.ShowDrawer(new ArquivoDigitalDrawer(filtro), 0, close: false);
+ }
+ }
+
+ private void InxlusaoAnexoTarefa_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.ArquivosAnexados = new ObservableCollection<ArquivoDigital>(ViewModel.ArquivosFinais);
+ ViewModel.ShowDrawer(new InclusaoArquivoDigitalDrawer(ViewModel), 0, close: false);
+ }
+
+ private void Imprimir_OnClick(object sender, RoutedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ //IL_0016: Unknown result type (might be due to invalid IL or missing references)
+ //IL_001c: Expected O, but got Unknown
+ Button val = (Button)sender;
+ if (((FrameworkElement)val).DataContext != null)
+ {
+ Tarefa val2 = (Tarefa)((FrameworkElement)val).DataContext;
+ if (((DomainBase)val2).Id != 0L)
+ {
+ ViewModel.SelectedTarefa = val2;
+ ViewModel.Print();
+ }
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/tarefadrawer.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_0083: Unknown result type (might be due to invalid IL or missing references)
+ //IL_008d: 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_00a7: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b3: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00bd: Expected O, but got Unknown
+ //IL_00c0: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ca: Expected O, but got Unknown
+ //IL_00cc: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00d8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00e2: Expected O, but got Unknown
+ //IL_00e4: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00f0: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00fa: Expected O, but got Unknown
+ //IL_00fc: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0108: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0112: Expected O, but got Unknown
+ //IL_0114: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0120: Unknown result type (might be due to invalid IL or missing references)
+ //IL_012a: Expected O, but got Unknown
+ //IL_012c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0138: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0142: Expected O, but got Unknown
+ //IL_0145: Unknown result type (might be due to invalid IL or missing references)
+ //IL_014f: Expected O, but got Unknown
+ //IL_015c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0166: Expected O, but got Unknown
+ //IL_0173: Unknown result type (might be due to invalid IL or missing references)
+ //IL_017d: Expected O, but got Unknown
+ //IL_0180: Unknown result type (might be due to invalid IL or missing references)
+ //IL_018a: Expected O, but got Unknown
+ //IL_018d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0197: Expected O, but got Unknown
+ //IL_019a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01a4: Expected O, but got Unknown
+ //IL_01da: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01e6: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01f0: Expected O, but got Unknown
+ //IL_01f3: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01fd: Expected O, but got Unknown
+ //IL_020a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0214: Expected O, but got Unknown
+ //IL_0221: Unknown result type (might be due to invalid IL or missing references)
+ //IL_022b: Expected O, but got Unknown
+ //IL_022e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0238: Expected O, but got Unknown
+ //IL_023a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0246: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0250: Expected O, but got Unknown
+ //IL_0253: Unknown result type (might be due to invalid IL or missing references)
+ //IL_025d: Expected O, but got Unknown
+ //IL_025f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_026b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0275: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ ProgressBar = (ProgressBar)target;
+ break;
+ case 2:
+ ((Selector)(ListBox)target).SelectionChanged += new SelectionChangedEventHandler(MenuList_OnSelectionChanged);
+ break;
+ case 3:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 4:
+ TitleBox = (TextBlock)target;
+ break;
+ case 7:
+ ((MenuItem)target).Click += new RoutedEventHandler(IncluirTarefa_OnClick);
+ break;
+ case 8:
+ ((MenuItem)target).Click += new RoutedEventHandler(Alterar_OnClick);
+ break;
+ case 9:
+ ((MenuItem)target).Click += new RoutedEventHandler(SalvarTarefa_OnClick);
+ break;
+ case 10:
+ ((MenuItem)target).Click += new RoutedEventHandler(Cancelar_OnClick);
+ break;
+ case 11:
+ ((MenuItem)target).Click += new RoutedEventHandler(InxlusaoAnexoTarefa_OnClick);
+ break;
+ case 15:
+ AgendamentoBox = (DatePicker)target;
+ ((UIElement)AgendamentoBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(DatePicker_OnLostKeyboardFocus);
+ ((Control)AgendamentoBox).MouseDoubleClick += new MouseButtonEventHandler(DataAtual_OnDoubleClick);
+ break;
+ case 16:
+ AtivoBox = (ToggleButton)target;
+ break;
+ case 17:
+ AnotacoesButton = (RadioButton)target;
+ break;
+ case 18:
+ AnotacoesInternasButton = (RadioButton)target;
+ break;
+ case 19:
+ Anotacoes = (WebEditor)target;
+ break;
+ case 20:
+ Historico = (WebEditor)target;
+ break;
+ case 21:
+ AnotacoesInternas = (WebEditor)target;
+ break;
+ case 22:
+ HistoricoInterno = (WebEditor)target;
+ break;
+ case 23:
+ ((Selector)(ComboBox)target).SelectionChanged += new SelectionChangedEventHandler(Status_OnSelectionChanged);
+ break;
+ case 24:
+ ConclusaoBox = (DatePicker)target;
+ ((UIElement)ConclusaoBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(DatePicker_OnLostKeyboardFocus);
+ ((Control)ConclusaoBox).MouseDoubleClick += new MouseButtonEventHandler(DataAtual_OnDoubleClick);
+ break;
+ case 25:
+ CboResponsavel = (ComboBox)target;
+ break;
+ case 26:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(AdicionarResponsavel_OnClick);
+ break;
+ case 28:
+ Snackbar = (Snackbar)target;
+ break;
+ case 29:
+ ((SnackbarMessage)target).ActionClick += new RoutedEventHandler(SnackbarMessage_ActionClick);
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IStyleConnector.Connect(int connectionId, object target)
+ {
+ //IL_0059: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0065: Unknown result type (might be due to invalid IL or missing references)
+ //IL_006f: Expected O, but got Unknown
+ //IL_0071: Unknown result type (might be due to invalid IL or missing references)
+ //IL_007d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0087: Expected O, but got Unknown
+ //IL_0089: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0095: Unknown result type (might be due to invalid IL or missing references)
+ //IL_009f: Expected O, but got Unknown
+ //IL_0029: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0035: Unknown result type (might be due to invalid IL or missing references)
+ //IL_003f: Expected O, but got Unknown
+ //IL_00a1: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ad: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b7: Expected O, but got Unknown
+ //IL_0041: Unknown result type (might be due to invalid IL or missing references)
+ //IL_004d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0057: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 5:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(CopyTelefoneToClipBoard_Click);
+ break;
+ case 6:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(WhatsAppMessage_Click);
+ break;
+ case 12:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(ExcluirTarefa_OnClick);
+ break;
+ case 13:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(AnexoTarefa_OnClick);
+ break;
+ case 14:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Imprimir_OnClick);
+ break;
+ case 27:
+ ((Chip)target).DeleteClick += new RoutedEventHandler(ExcluirResponsavel_OnClick);
+ break;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/ValoresApoliceDrawer.cs b/Decompiler/Gestor.Application.Drawers/ValoresApoliceDrawer.cs
new file mode 100644
index 0000000..cd893d3
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/ValoresApoliceDrawer.cs
@@ -0,0 +1,62 @@
+using System;
+using System.CodeDom.Compiler;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Markup;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Application.Views.Generic;
+using Gestor.Model.Domain.Seguros;
+
+namespace Gestor.Application.Drawers;
+
+public class ValoresApoliceDrawer : BaseUserControl, IComponentConnector
+{
+ private bool _contentLoaded;
+
+ public ValoresApoliceViewModel ViewModel { get; set; }
+
+ public ValoresApoliceDrawer(Documento documento)
+ {
+ ViewModel = new ValoresApoliceViewModel(documento);
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/valoresapolicedrawer.xaml", UriKind.Relative);
+ Application.LoadComponent((object)this, uri);
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IComponentConnector.Connect(int connectionId, object target)
+ {
+ //IL_0005: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0011: Unknown result type (might be due to invalid IL or missing references)
+ //IL_001b: Expected O, but got Unknown
+ if (connectionId == 1)
+ {
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ }
+ else
+ {
+ _contentLoaded = true;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/ValoresParcelaDrawer.cs b/Decompiler/Gestor.Application.Drawers/ValoresParcelaDrawer.cs
new file mode 100644
index 0000000..9ef95f3
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/ValoresParcelaDrawer.cs
@@ -0,0 +1,70 @@
+using System;
+using System.CodeDom.Compiler;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Markup;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Application.Views.Generic;
+using Gestor.Model.Domain.Seguros;
+
+namespace Gestor.Application.Drawers;
+
+public class ValoresParcelaDrawer : BaseUserControl, IComponentConnector
+{
+ internal DockPanel pnlStatusParcelaExtrato;
+
+ private bool _contentLoaded;
+
+ public ValoresParcelaViewModel ViewModel { get; set; }
+
+ public ValoresParcelaDrawer(Parcela parcela, Documento documento)
+ {
+ ViewModel = new ValoresParcelaViewModel(parcela, documento);
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/valoresparceladrawer.xaml", UriKind.Relative);
+ Application.LoadComponent((object)this, uri);
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IComponentConnector.Connect(int connectionId, object target)
+ {
+ //IL_000b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0017: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0021: Expected O, but got Unknown
+ //IL_0024: Unknown result type (might be due to invalid IL or missing references)
+ //IL_002e: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 2:
+ pnlStatusParcelaExtrato = (DockPanel)target;
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+}
diff --git a/Decompiler/Gestor.Application.Drawers/VinculoVendedorDrawer.cs b/Decompiler/Gestor.Application.Drawers/VinculoVendedorDrawer.cs
new file mode 100644
index 0000000..1e570a0
--- /dev/null
+++ b/Decompiler/Gestor.Application.Drawers/VinculoVendedorDrawer.cs
@@ -0,0 +1,135 @@
+using System;
+using System.CodeDom.Compiler;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Markup;
+using Gestor.Application.ViewModels.Drawer;
+using Gestor.Application.Views.Generic;
+using Gestor.Common.Validation;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Generic;
+using Gestor.Model.Domain.Seguros;
+
+namespace Gestor.Application.Drawers;
+
+public class VinculoVendedorDrawer : BaseUserControl, IComponentConnector
+{
+ public VinculoVendedorViewModel ViewModel;
+
+ internal DataGrid VendedorGrid;
+
+ internal DataGrid VinculadoGrid;
+
+ private bool _contentLoaded;
+
+ public VinculoVendedorDrawer(Usuario usuario)
+ {
+ ViewModel = new VinculoVendedorViewModel(usuario);
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ }
+
+ private void AutoCompleteBox_Populating(object sender, PopulatingEventArgs e)
+ {
+ if (e.Parameter.Length >= 3)
+ {
+ e.Cancel = true;
+ ViewModel.BuscarVinculoVendedor(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate
+ {
+ //IL_0006: Unknown result type (might be due to invalid IL or missing references)
+ ((AutoCompleteBox)sender).PopulateComplete();
+ }, TaskScheduler.FromCurrentSynchronizationContext());
+ }
+ }
+
+ private async void AutoCompleteBox_OnTextChanged(object sender, RoutedEventArgs e)
+ {
+ if (!(((AutoCompleteBox)sender).Text != string.Empty))
+ {
+ await ViewModel.BuscarVinculoVendedor("");
+ }
+ }
+
+ private async void SalvarVinculo_OnClick(object sender, RoutedEventArgs e)
+ {
+ await ViewModel.Salvar();
+ ViewModel.ToggleSnackBar("VÍNCULO DE USUÁRIO SALVO COM SUCESSO.");
+ }
+
+ private void Fechar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.CloseDrawer();
+ }
+
+ private void AbrirLog_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.AbrirLog((TipoTela)45, ((DomainBase)ViewModel.SelectedUsuario).Id);
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/drawers/vinculovendedordrawer.xaml", UriKind.Relative);
+ Application.LoadComponent((object)this, uri);
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IComponentConnector.Connect(int connectionId, object target)
+ {
+ //IL_0026: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0032: Unknown result type (might be due to invalid IL or missing references)
+ //IL_003c: Expected O, but got Unknown
+ //IL_003e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_004a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0054: Expected O, but got Unknown
+ //IL_0055: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0061: Unknown result type (might be due to invalid IL or missing references)
+ //IL_006b: Expected O, but got Unknown
+ //IL_006d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0079: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0083: Expected O, but got Unknown
+ //IL_0086: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0090: Expected O, but got Unknown
+ //IL_0093: Unknown result type (might be due to invalid IL or missing references)
+ //IL_009d: Expected O, but got Unknown
+ //IL_009f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ab: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b5: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick);
+ break;
+ case 2:
+ ((AutoCompleteBox)target).Populating += new PopulatingEventHandler(AutoCompleteBox_Populating);
+ ((AutoCompleteBox)target).TextChanged += new RoutedEventHandler(AutoCompleteBox_OnTextChanged);
+ break;
+ case 3:
+ ((MenuItem)target).Click += new RoutedEventHandler(AbrirLog_OnClick);
+ break;
+ case 4:
+ VendedorGrid = (DataGrid)target;
+ break;
+ case 5:
+ VinculadoGrid = (DataGrid)target;
+ break;
+ case 6:
+ ((MenuItem)target).Click += new RoutedEventHandler(SalvarVinculo_OnClick);
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+}