summaryrefslogtreecommitdiff
path: root/Decompiler/Gestor.Application.Drawers/ArquivoDigitalDrawer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Decompiler/Gestor.Application.Drawers/ArquivoDigitalDrawer.cs')
-rw-r--r--Decompiler/Gestor.Application.Drawers/ArquivoDigitalDrawer.cs712
1 files changed, 712 insertions, 0 deletions
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;
+ }
+ }
+}