diff options
Diffstat (limited to 'Decompiler/Gestor.Application.Views.Seguros/ClienteView.cs')
| -rw-r--r-- | Decompiler/Gestor.Application.Views.Seguros/ClienteView.cs | 1261 |
1 files changed, 1261 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.Views.Seguros/ClienteView.cs b/Decompiler/Gestor.Application.Views.Seguros/ClienteView.cs new file mode 100644 index 0000000..a05df26 --- /dev/null +++ b/Decompiler/Gestor.Application.Views.Seguros/ClienteView.cs @@ -0,0 +1,1261 @@ +using System; +using System.CodeDom.Compiler; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.Linq; +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.Componentes; +using Gestor.Application.Drawers; +using Gestor.Application.Helpers; +using Gestor.Application.Servicos; +using Gestor.Application.ViewModels.Seguros; +using Gestor.Application.Views.Generic; +using Gestor.Common.Helpers; +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 Xceed.Wpf.AvalonDock.Controls; + +namespace Gestor.Application.Views.Seguros; + +public class ClienteView : BaseUserControl, IComponentConnector, IStyleConnector +{ + public ClienteViewModel ViewModel; + + internal Grid MainGrid; + + internal MenuItem IncluirClienteButton; + + internal ComboBox TipoDocumentoPrincipalBox; + + internal TextBox DocumentoPrincipalBox; + + internal TextBox NomeBox; + + internal TextBox NomeSocialBox; + + internal TextBox CaepfBox; + + internal TextBox RneBox; + + internal TextBox CeiBox; + + internal TextBox IdentidadeBox; + + internal TextBox EmissorBox; + + internal TextBox EstadoEmissorBox; + + internal TextBox HabilitacaoBox; + + internal TextBox CategoriaHabilitacaooBox; + + internal ComboBox SexoBox; + + internal ComboBox EstadoCivilBox; + + internal AutoCompleteBox AutoCompleteProfissao; + + internal AutoCompleteBox AutoCompleteAtividade; + + internal TextBox ResponsavelBox; + + internal TextBox DocumentoResponsavel; + + internal TextBox EmailBox; + + internal TextBox PastaBox; + + internal AutoCompleteBox AutoCompleteBanco; + + internal TextBox AgenciaBox; + + internal TextBox TipoContaBox; + + internal TextBox ContaBox; + + internal CurrencyTextBox RendaMensalBox; + + internal ListBox TelefoneListBox; + + internal ListBox EmailListBox; + + internal ListBox EnderecoListBox; + + internal AutoCompleteBox VinculoBox; + + internal TextBox NomeOrigemBox; + + internal ListBox ContatosListBox; + + private bool _contentLoaded; + + private static int Ordem { get; set; } + + public ClienteView(Cliente cliente = null, bool lockInsert = false, ClienteViewModel viewModel = null) + { + ((FrameworkElement)this).Tag = "CADASTRO DE CLIENTES"; + ViewModel = viewModel ?? new ClienteViewModel(cliente, !lockInsert); + ((FrameworkElement)this).DataContext = ViewModel; + InitializeComponent(); + Dispatcher dispatcher = ((DispatcherObject)this).Dispatcher; + if (dispatcher != null) + { + dispatcher.BeginInvoke((DispatcherPriority)7, (Delegate)new Action(ContentLoad)); + } + if (lockInsert) + { + ((UIElement)IncluirClienteButton).IsEnabled = false; + } + if (cliente != null) + { + ViewModel.RegistrarAcao("ACESSOU CLIENTE \"" + cliente.Nome + "\"", ((DomainBase)cliente).Id, (TipoTela)1, $"ID CLIENTE: {((DomainBase)cliente).Id}"); + } + } + + private void ContentLoad() + { + //IL_0051: Unknown result type (might be due to invalid IL or missing references) + //IL_005b: Expected O, but got Unknown + ((FrameworkElement)TelefoneListBox).DataContext = ViewModel; + ((FrameworkElement)EmailListBox).DataContext = ViewModel; + ((FrameworkElement)EnderecoListBox).DataContext = ViewModel; + ((FrameworkElement)ContatosListBox).DataContext = ViewModel; + ((UIElement)DocumentoResponsavel).LostFocus += new RoutedEventHandler(Validar_LostFocus); + if (ViewModel.SelectedCliente != null) + { + AutoCompleteBox autoCompleteBanco = AutoCompleteBanco; + Banco banco = ViewModel.SelectedCliente.Banco; + autoCompleteBanco.Text = ((banco != null) ? banco.Nome : null); + AutoCompleteBox autoCompleteAtividade = AutoCompleteAtividade; + Atividade atividade = ViewModel.SelectedCliente.Atividade; + autoCompleteAtividade.Text = ((atividade != null) ? atividade.Nome : null); + AutoCompleteBox autoCompleteProfissao = AutoCompleteProfissao; + Profissao profissao = ViewModel.SelectedCliente.Profissao; + autoCompleteProfissao.Text = ((profissao != null) ? profissao.Nome : null); + } + } + + private void DocumentoPrincipalBox_LostFocus(object sender, RoutedEventArgs e) + { + //IL_0001: Unknown result type (might be due to invalid IL or missing references) + //IL_000f: Unknown result type (might be due to invalid IL or missing references) + //IL_0015: Expected O, but got Unknown + //IL_0098: Unknown result type (might be due to invalid IL or missing references) + if (((TextBoxBase)(TextBox)sender).IsReadOnly) + { + return; + } + TextBox val = (TextBox)sender; + string text = ValidationHelper.Clear(val.Text); + if (string.IsNullOrEmpty(text)) + { + return; + } + val.Text = ((text.Length == 11) ? ValidationHelper.FormatDocument(text.PadLeft(11, '0').Substring(0, 11)) : ValidationHelper.FormatDocument(text.PadLeft(14, '0').Substring(0, 14))); + if (((FrameworkElement)val).Name == "DocumentoPrincipalBox") + { + ViewModel.JuridicaouFisica(DocumentoPrincipalBox.Text); + if ((int)ViewModel.VisibilityFisica == 0) + { + ResponsavelBox.Text = string.Empty; + DocumentoResponsavel.Text = string.Empty; + EmailBox.Text = string.Empty; + } + } + } + + private void IncluirEmail_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.IncluirEmail(); + ValidarTela(); + } + + private void IncluirEndereco_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.IncluirEndereco(); + ValidarTela(); + } + + 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); + ClienteTelefone telefone = (ClienteTelefone)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)]; + ViewModel.ExcluirTelefone(telefone); + } + } + + 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); + ClienteEmail email = (ClienteEmail)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)]; + ViewModel.ExcluirEmail(email); + } + } + + private void ExcluirEndereco_OnClick(object sender, RoutedEventArgs e) + { + //IL_0001: Unknown result type (might be due to invalid IL or missing references) + //IL_000b: Expected O, but got Unknown + //IL_002f: Unknown result type (might be due to invalid IL or missing references) + //IL_0035: Expected O, but got Unknown + Grid val = Extentions.FindVisualAncestor<Grid>((DependencyObject)(Button)sender); + ListBox val2 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val); + ClienteEndereco endereco = (ClienteEndereco)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)]; + ViewModel.ExcluirEndereco(endereco); + } + + private void IncluirMaisContatos_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.IncluirContato(); + } + + private void IncluirVinculo_OnClick(object sender, RoutedEventArgs e) + { + if (ViewModel.IncluirVinculo()) + { + VinculoBox.Text = ""; + } + } + + private void ExcluirMaisContatos_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_0019: Unknown result type (might be due to invalid IL or missing references) + //IL_001f: Expected O, but got Unknown + Button val = (Button)sender; + if (val != null && ((FrameworkElement)val).DataContext != null) + { + MaisContato contato = (MaisContato)((FrameworkElement)val).DataContext; + ViewModel.ExcluirContato(contato); + } + } + + private void ExcluirVinculo_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_0019: Unknown result type (might be due to invalid IL or missing references) + //IL_001f: Expected O, but got Unknown + Button val = (Button)sender; + if (val != null && ((FrameworkElement)val).DataContext != null) + { + ClienteVinculo vinculo = (ClienteVinculo)((FrameworkElement)val).DataContext; + ViewModel.ExcluirVinculo(vinculo); + } + } + + private void Incluir_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.IncluirCliente(); + DocumentoPrincipalBox.Text = ""; + AutoCompleteBanco.Text = ""; + AutoCompleteProfissao.Text = ""; + AutoCompleteAtividade.Text = ""; + ((UIElement)DocumentoPrincipalBox).Focus(); + ValidarTela(); + } + + private void Alterar_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.Alterar(alterar: true); + ClearInputFields(); + ValidarTela(); + ((DomainBase)ViewModel.SelectedCliente).Initialize(); + InitializeResponsavelAssinatura(); + ViewModel.Salvando = false; + } + + private void InitializeResponsavelAssinatura() + { + TextBox responsavelBox = ResponsavelBox; + ResponsavelAssinatura responsavelAssinatura = ViewModel.SelectedCliente.ResponsavelAssinatura; + responsavelBox.Text = ((responsavelAssinatura != null) ? responsavelAssinatura.NomeResponsavel : null) ?? string.Empty; + TextBox documentoResponsavel = DocumentoResponsavel; + ResponsavelAssinatura responsavelAssinatura2 = ViewModel.SelectedCliente.ResponsavelAssinatura; + documentoResponsavel.Text = ((responsavelAssinatura2 != null) ? responsavelAssinatura2.DocumentoResponsavel : null) ?? string.Empty; + TextBox emailBox = EmailBox; + ResponsavelAssinatura responsavelAssinatura3 = ViewModel.SelectedCliente.ResponsavelAssinatura; + emailBox.Text = ((responsavelAssinatura3 != null) ? responsavelAssinatura3.EmailResponsavel : null) ?? string.Empty; + } + + private void Cancelar_OnClick(object sender, RoutedEventArgs e) + { + ClearInputFields(); + SetValid(AutoCompleteBanco, valid: true); + ViewModel.CancelarAlteracao(); + } + + private void ClearInputFields() + { + AutoCompleteBox autoCompleteBanco = AutoCompleteBanco; + Banco banco = ViewModel.SelectedCliente.Banco; + autoCompleteBanco.Text = ((banco != null) ? banco.Nome : null) ?? string.Empty; + AutoCompleteBox autoCompleteProfissao = AutoCompleteProfissao; + Profissao profissao = ViewModel.SelectedCliente.Profissao; + autoCompleteProfissao.Text = ((profissao != null) ? profissao.Nome : null) ?? string.Empty; + AutoCompleteBox autoCompleteProfissao2 = AutoCompleteProfissao; + Profissao profissao2 = ViewModel.SelectedCliente.Profissao; + autoCompleteProfissao2.Text = ((profissao2 != null) ? profissao2.Nome : null) ?? string.Empty; + AutoCompleteBox autoCompleteAtividade = AutoCompleteAtividade; + Atividade atividade = ViewModel.SelectedCliente.Atividade; + autoCompleteAtividade.Text = ((atividade != null) ? atividade.Nome : null) ?? string.Empty; + } + + private void Excluir_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.Excluir(); + } + + private async void Salvar_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.Loading(isLoading: true); + ViewModel.ProfissaoText = AutoCompleteProfissao.Text; + ViewModel.AtividadeText = AutoCompleteAtividade.Text; + List<KeyValuePair<string, string>> list = await ViewModel.Salvar(); + ((DependencyObject)(object)this).ValidateFields(list); + bool num = list == null || list.Count == 0; + ViewModel.Loading(isLoading: false); + if (num) + { + SetValid(AutoCompleteBanco, valid: true); + } + else + { + await ViewModel.ShowMessage(list.Distinct().ToList(), ViewModel.ErroCamposInvalidos, "OK"); + } + } + + private async void AbrirAquivoDigital_Click(object sender, RoutedEventArgs e) + { + if (!new PermissaoArquivoDigitalServico().BuscarPermissao(Recursos.Usuario, (TipoArquivoDigital)1).Consultar) + { + await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ACESSAR\nARQUIVO DIGITAL DE " + EnumHelper.GetDescription<TipoArquivoDigital>((TipoArquivoDigital)1) + "."); + return; + } + FiltroArquivoDigital filtro = new FiltroArquivoDigital + { + Id = ((DomainBase)ViewModel.SelectedCliente).Id, + Tipo = (TipoArquivoDigital)1, + Parente = ViewModel.SelectedCliente + }; + ViewModel.ShowDrawer(new ArquivoDigitalDrawer(filtro), 0, close: false); + } + + private async void PostcodeBox_OnLostFocus(object sender, RoutedEventArgs e) + { + TextBox val = (TextBox)sender; + if (((TextBoxBase)val).IsReadOnly || string.IsNullOrWhiteSpace(val.Text)) + { + return; + } + string text = ValidationHelper.FormatPostCode(val.Text); + WrapPanel val2 = Extentions.FindVisualAncestor<WrapPanel>((DependencyObject)(object)val); + ListBox val3 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val2); + ListBoxItem val4 = (ListBoxItem)((ItemsControl)val3).ItemContainerGenerator.ContainerFromIndex(((CollectionView)((ItemsControl)val3).Items).IndexOf(((FrameworkElement)val2).DataContext)); + ContentPresenter contentPresenter = FindVisualChild.Find<ContentPresenter>((DependencyObject)(object)val4); + DataTemplate dataTemplate = contentPresenter.ContentTemplate; + TextBox val5 = (TextBox)((FrameworkTemplate)dataTemplate).FindName("CepBox", (FrameworkElement)(object)contentPresenter); + ProgressBar progress = (ProgressBar)((FrameworkTemplate)dataTemplate).FindName("ProgressCep", (FrameworkElement)(object)contentPresenter); + ((UIElement)progress).Visibility = (Visibility)0; + val5.Text = text; + if (!ValidationHelper.ValidatePostCode(text)) + { + ((UIElement)progress).Visibility = (Visibility)2; + return; + } + EnderecoBase val6 = await ViewModel.BuscaCep(text); + if (val6 == null) + { + ((UIElement)progress).Visibility = (Visibility)2; + return; + } + TextBox val7 = (TextBox)((FrameworkTemplate)dataTemplate).FindName("EnderecoBox", (FrameworkElement)(object)contentPresenter); + TextBox val8 = (TextBox)((FrameworkTemplate)dataTemplate).FindName("CidadeBox", (FrameworkElement)(object)contentPresenter); + TextBox val9 = (TextBox)((FrameworkTemplate)dataTemplate).FindName("EstadoBox", (FrameworkElement)(object)contentPresenter); + TextBox val10 = (TextBox)((FrameworkTemplate)dataTemplate).FindName("BairroBox", (FrameworkElement)(object)contentPresenter); + val7.Text = val6.Endereco; + val8.Text = val6.Cidade; + val9.Text = val6.Estado; + val10.Text = val6.Bairro; + ((UIElement)progress).Visibility = (Visibility)2; + } + + public override void FormatarDocumento(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; + val.Text = ValidationHelper.FormatDocument(val.Text); + ViewModel.JuridicaouFisica(val.Text); + } + + private void ValidarTela() + { + if (ViewModel.SelectedCliente != null) + { + List<KeyValuePair<string, string>> list = ViewModel.SelectedCliente.Validate(); + if (Recursos.Configuracoes.All((ConfiguracaoSistema x) => (int)x.Configuracao != 29)) + { + ClienteEmail? obj = ViewModel.Emails.FirstOrDefault(); + list.AddRange(((obj != null) ? obj.Validate() : null) ?? new List<KeyValuePair<string, string>>()); + } + ClienteTelefone? obj2 = ViewModel.Telefones.FirstOrDefault(); + list.AddRange(((obj2 != null) ? obj2.Validate() : null) ?? new List<KeyValuePair<string, string>>()); + ClienteEndereco? obj3 = ViewModel.Enderecos.FirstOrDefault(); + list.AddRange(((obj3 != null) ? obj3.Validate() : null) ?? new List<KeyValuePair<string, string>>()); + ((DependencyObject)(object)this).ValidateFields(list, focusField: false); + } + } + + private void AutoCompleteProfissaoBox_Populating(object sender, PopulatingEventArgs e) + { + if (e.Parameter.Length < 1) + { + return; + } + e.Cancel = true; + ViewModel.BuscarProfissao(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate(Task<List<Profissao>> 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 AutoCompleteAtividadeBox_Populating(object sender, PopulatingEventArgs e) + { + if (e.Parameter.Length < 1) + { + return; + } + e.Cancel = true; + ViewModel.BuscarAtividade(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate(Task<List<Atividade>> 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 AutoCompleteBancoBox_Populating(object sender, PopulatingEventArgs e) + { + if (e.Parameter.Length < 3) + { + return; + } + e.Cancel = true; + ViewModel.BuscarBanco(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate(Task<List<Banco>> 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 AutoCompleteParentescoBox_Populating(object sender, PopulatingEventArgs e) + { + if (e.Parameter.Length < 3) + { + return; + } + e.Cancel = true; + ViewModel.BuscarClienteVinculo(ValidationHelper.RemoveDiacritics(e.Parameter.Trim()), ((DomainBase)ViewModel.SelectedCliente).Id).ContinueWith(delegate(Task<List<Cliente>> 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 OrdemBox_OnLostFocus(object sender, RoutedEventArgs e) + { + //IL_0064: Unknown result type (might be due to invalid IL or missing references) + //IL_006e: Expected O, but got Unknown + //IL_0083: Unknown result type (might be due to invalid IL or missing references) + //IL_008a: Expected O, but got Unknown + TextBox val = (TextBox)((sender is TextBox) ? sender : null); + if (val == null || ((TextBoxBase)val).IsReadOnly || !int.TryParse(val.Text, out var result)) + { + return; + } + WrapPanel val2 = Extentions.FindVisualAncestor<WrapPanel>((DependencyObject)(object)Extentions.FindVisualAncestor<CustomItemValidation>((DependencyObject)(object)val)); + ListBox val3 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val2); + if (val3 == null) + { + return; + } + for (int i = 0; i < ((CollectionView)((ItemsControl)val3).Items).Count; i++) + { + if (i != ((CollectionView)((ItemsControl)val3).Items).IndexOf(((FrameworkElement)val2).DataContext)) + { + ContentPresenter val4 = FindVisualChild.Find<ContentPresenter>((DependencyObject)(ListBoxItem)((ItemsControl)val3).ItemContainerGenerator.ContainerFromIndex(i)); + TextBox val5 = (TextBox)((FrameworkTemplate)val4.ContentTemplate).FindName("OrdemBox", (FrameworkElement)(object)val4); + if (int.TryParse(val5.Text, out var result2) && result2 == result) + { + val5.Text = Ordem.ToString(); + } + } + } + } + + private void OrdemBox_OnPreviewGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e) + { + TextBox val = (TextBox)((sender is TextBox) ? sender : null); + if (val != null && int.TryParse(val.Text, out var result)) + { + Ordem = result; + } + } + + private void AbrirLog_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.AbrirLog((TipoTela)1, ((DomainBase)ViewModel.SelectedCliente).Id); + } + + private void AbrirLogEmail_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.AbrirLogEmail((TipoTela)1, ((DomainBase)ViewModel.SelectedCliente).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; + } + } + } + + private void AutoCompleteBanco_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) + //IL_002e: Expected O, but got Unknown + AutoCompleteBox val = (AutoCompleteBox)sender; + SetValid(val, string.IsNullOrWhiteSpace(val.Text) || ViewModel.SelectedCliente.Banco != null); + } + + private static void SetValid(AutoCompleteBox autocomplete, bool valid) + { + ViewHelper.SetInvalid((Control)(object)autocomplete, "BANCO INVÁLIDO", valid); + } + + private void Tarefa_Click(object sender, RoutedEventArgs e) + { + //IL_0000: Unknown result type (might be due to invalid IL or missing references) + //IL_0005: Unknown result type (might be due to invalid IL or missing references) + //IL_001b: Unknown result type (might be due to invalid IL or missing references) + //IL_0031: Unknown result type (might be due to invalid IL or missing references) + //IL_0038: Unknown result type (might be due to invalid IL or missing references) + //IL_004e: Unknown result type (might be due to invalid IL or missing references) + //IL_0065: Expected O, but got Unknown + Tarefa tarefa = new Tarefa + { + IdCliente = ((DomainBase)ViewModel.SelectedCliente).Id, + Cliente = ViewModel.SelectedCliente.Nome, + Entidade = (TipoTarefa)2, + IdEntidade = ((DomainBase)ViewModel.SelectedCliente).Id, + Titulo = ViewModel.SelectedCliente.Nome + }; + ViewModel.ShowDrawer(new TarefaDrawer(tarefa), 0, close: false); + } + + private void Validar_LostFocus(object sender, RoutedEventArgs e) + { + ValidarTela(); + } + + private async void ExcluirOrigem_OnClick(object sender, RoutedEventArgs e) + { + Button val = (Button)sender; + if (((FrameworkElement)val).DataContext != null) + { + ViewModel.Loading(isLoading: true); + await ViewModel.ExcluirOrigem((OrigemCliente)((FrameworkElement)val).DataContext); + ViewModel.Loading(isLoading: false); + } + } + + private async void IncluirOrigem_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.Loading(isLoading: true); + await ViewModel.IncluirOrigem(NomeOrigemBox.Text.Trim()); + NomeOrigemBox.Text = string.Empty; + ViewModel.Loading(isLoading: false); + } + + private void MenuItem_Click(object sender, RoutedEventArgs e) + { + ViewModel.AbrirLogAntigo(); + } + + [DebuggerNonUserCode] + [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() + { + if (!_contentLoaded) + { + _contentLoaded = true; + Uri uri = new Uri("/Gestor.Application;component/views/seguros/clienteview.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_0113: Unknown result type (might be due to invalid IL or missing references) + //IL_011d: Expected O, but got Unknown + //IL_0120: Unknown result type (might be due to invalid IL or missing references) + //IL_012a: Expected O, but got Unknown + //IL_0137: Unknown result type (might be due to invalid IL or missing references) + //IL_0141: Expected O, but got Unknown + //IL_0143: Unknown result type (might be due to invalid IL or missing references) + //IL_014f: Unknown result type (might be due to invalid IL or missing references) + //IL_0159: Expected O, but got Unknown + //IL_015b: Unknown result type (might be due to invalid IL or missing references) + //IL_0167: Unknown result type (might be due to invalid IL or missing references) + //IL_0171: Expected O, but got Unknown + //IL_0173: Unknown result type (might be due to invalid IL or missing references) + //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 + //IL_01a3: Unknown result type (might be due to invalid IL or missing references) + //IL_01af: Unknown result type (might be due to invalid IL or missing references) + //IL_01b9: Expected O, but got Unknown + //IL_01bb: Unknown result type (might be due to invalid IL or missing references) + //IL_01c7: Unknown result type (might be due to invalid IL or missing references) + //IL_01d1: Expected O, but got Unknown + //IL_01d3: Unknown result type (might be due to invalid IL or missing references) + //IL_01df: Unknown result type (might be due to invalid IL or missing references) + //IL_01e9: Expected O, but got Unknown + //IL_01eb: Unknown result type (might be due to invalid IL or missing references) + //IL_01f7: Unknown result type (might be due to invalid IL or missing references) + //IL_0201: Expected O, but got Unknown + //IL_0203: Unknown result type (might be due to invalid IL or missing references) + //IL_020f: Unknown result type (might be due to invalid IL or missing references) + //IL_0219: Expected O, but got Unknown + //IL_021c: Unknown result type (might be due to invalid IL or missing references) + //IL_0226: 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_0241: Unknown result type (might be due to invalid IL or missing references) + //IL_024b: Expected O, but got Unknown + //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 + //IL_0295: Unknown result type (might be due to invalid IL or missing references) + //IL_02a1: Unknown result type (might be due to invalid IL or missing references) + //IL_02ab: Expected O, but got Unknown + //IL_02ac: Unknown result type (might be due to invalid IL or missing references) + //IL_02b8: Unknown result type (might be due to invalid IL or missing references) + //IL_02c2: Expected O, but got Unknown + //IL_02c3: Unknown result type (might be due to invalid IL or missing references) + //IL_02cf: Unknown result type (might be due to invalid IL or missing references) + //IL_02d9: Expected O, but got Unknown + //IL_02dc: Unknown result type (might be due to invalid IL or missing references) + //IL_02e6: Expected O, but got Unknown + //IL_02e9: Unknown result type (might be due to invalid IL or missing references) + //IL_02f3: Expected O, but got Unknown + //IL_02f6: Unknown result type (might be due to invalid IL or missing references) + //IL_0300: Expected O, but got Unknown + //IL_0303: Unknown result type (might be due to invalid IL or missing references) + //IL_030d: Expected O, but got Unknown + //IL_0310: Unknown result type (might be due to invalid IL or missing references) + //IL_031a: Expected O, but got Unknown + //IL_0327: Unknown result type (might be due to invalid IL or missing references) + //IL_0331: Expected O, but got Unknown + //IL_0334: Unknown result type (might be due to invalid IL or missing references) + //IL_033e: Expected O, but got Unknown + //IL_034b: Unknown result type (might be due to invalid IL or missing references) + //IL_0355: Expected O, but got Unknown + //IL_0357: Unknown result type (might be due to invalid IL or missing references) + //IL_0363: Unknown result type (might be due to invalid IL or missing references) + //IL_036d: Expected O, but got Unknown + //IL_036e: Unknown result type (might be due to invalid IL or missing references) + //IL_037a: Unknown result type (might be due to invalid IL or missing references) + //IL_0384: Expected O, but got Unknown + //IL_0385: Unknown result type (might be due to invalid IL or missing references) + //IL_0391: Unknown result type (might be due to invalid IL or missing references) + //IL_039b: Expected O, but got Unknown + //IL_039c: Unknown result type (might be due to invalid IL or missing references) + //IL_03a8: Unknown result type (might be due to invalid IL or missing references) + //IL_03b2: Expected O, but got Unknown + //IL_03b5: Unknown result type (might be due to invalid IL or missing references) + //IL_03bf: Expected O, but got Unknown + //IL_03cd: Unknown result type (might be due to invalid IL or missing references) + //IL_03d7: Expected O, but got Unknown + //IL_03da: Unknown result type (might be due to invalid IL or missing references) + //IL_03e4: Expected O, but got Unknown + //IL_03f2: Unknown result type (might be due to invalid IL or missing references) + //IL_03fc: Expected O, but got Unknown + //IL_03fe: Unknown result type (might be due to invalid IL or missing references) + //IL_040a: Unknown result type (might be due to invalid IL or missing references) + //IL_0414: Expected O, but got Unknown + //IL_0415: Unknown result type (might be due to invalid IL or missing references) + //IL_0421: Unknown result type (might be due to invalid IL or missing references) + //IL_042b: Expected O, but got Unknown + //IL_042c: Unknown result type (might be due to invalid IL or missing references) + //IL_0438: Unknown result type (might be due to invalid IL or missing references) + //IL_0442: Expected O, but got Unknown + //IL_0444: Unknown result type (might be due to invalid IL or missing references) + //IL_0450: Unknown result type (might be due to invalid IL or missing references) + //IL_045a: Expected O, but got Unknown + //IL_045b: Unknown result type (might be due to invalid IL or missing references) + //IL_0467: Unknown result type (might be due to invalid IL or missing references) + //IL_0471: Expected O, but got Unknown + //IL_0472: Unknown result type (might be due to invalid IL or missing references) + //IL_047e: Unknown result type (might be due to invalid IL or missing references) + //IL_0488: Expected O, but got Unknown + //IL_048b: Unknown result type (might be due to invalid IL or missing references) + //IL_0495: Expected O, but got Unknown + //IL_0498: Unknown result type (might be due to invalid IL or missing references) + //IL_04a2: Expected O, but got Unknown + //IL_04a5: Unknown result type (might be due to invalid IL or missing references) + //IL_04af: Expected O, but got Unknown + //IL_04bc: Unknown result type (might be due to invalid IL or missing references) + //IL_04c6: Expected O, but got Unknown + //IL_04c9: Unknown result type (might be due to invalid IL or missing references) + //IL_04d3: Expected O, but got Unknown + //IL_04e0: Unknown result type (might be due to invalid IL or missing references) + //IL_04ea: Expected O, but got Unknown + //IL_04ed: Unknown result type (might be due to invalid IL or missing references) + //IL_04f7: Expected O, but got Unknown + //IL_0504: Unknown result type (might be due to invalid IL or missing references) + //IL_050e: Expected O, but got Unknown + //IL_0511: Unknown result type (might be due to invalid IL or missing references) + //IL_051b: Expected O, but got Unknown + //IL_0529: Unknown result type (might be due to invalid IL or missing references) + //IL_0533: Expected O, but got Unknown + //IL_0540: Unknown result type (might be due to invalid IL or missing references) + //IL_054a: Expected O, but got Unknown + //IL_054d: Unknown result type (might be due to invalid IL or missing references) + //IL_0557: Expected O, but got Unknown + //IL_0564: Unknown result type (might be due to invalid IL or missing references) + //IL_056e: Expected O, but got Unknown + //IL_0570: Unknown result type (might be due to invalid IL or missing references) + //IL_057c: Unknown result type (might be due to invalid IL or missing references) + //IL_0586: Expected O, but got Unknown + //IL_0587: Unknown result type (might be due to invalid IL or missing references) + //IL_0593: Unknown result type (might be due to invalid IL or missing references) + //IL_059d: Expected O, but got Unknown + //IL_059e: Unknown result type (might be due to invalid IL or missing references) + //IL_05aa: Unknown result type (might be due to invalid IL or missing references) + //IL_05b4: Expected O, but got Unknown + //IL_05b7: Unknown result type (might be due to invalid IL or missing references) + //IL_05c1: Expected O, but got Unknown + //IL_05c4: Unknown result type (might be due to invalid IL or missing references) + //IL_05ce: Expected O, but got Unknown + //IL_05db: Unknown result type (might be due to invalid IL or missing references) + //IL_05e5: Expected O, but got Unknown + //IL_05f2: Unknown result type (might be due to invalid IL or missing references) + //IL_05fc: Expected O, but got Unknown + //IL_05ff: Unknown result type (might be due to invalid IL or missing references) + //IL_0609: Expected O, but got Unknown + //IL_060c: Unknown result type (might be due to invalid IL or missing references) + //IL_0616: Expected O, but got Unknown + //IL_0619: Unknown result type (might be due to invalid IL or missing references) + //IL_0623: Expected O, but got Unknown + //IL_0626: Unknown result type (might be due to invalid IL or missing references) + //IL_0630: Expected O, but got Unknown + //IL_0632: Unknown result type (might be due to invalid IL or missing references) + //IL_063e: Unknown result type (might be due to invalid IL or missing references) + //IL_0648: Expected O, but got Unknown + //IL_064b: Unknown result type (might be due to invalid IL or missing references) + //IL_0655: Expected O, but got Unknown + //IL_0657: Unknown result type (might be due to invalid IL or missing references) + //IL_0663: Unknown result type (might be due to invalid IL or missing references) + //IL_066d: Expected O, but got Unknown + //IL_0670: Unknown result type (might be due to invalid IL or missing references) + //IL_067a: Expected O, but got Unknown + //IL_067c: Unknown result type (might be due to invalid IL or missing references) + //IL_0688: Unknown result type (might be due to invalid IL or missing references) + //IL_0692: Expected O, but got Unknown + //IL_0695: Unknown result type (might be due to invalid IL or missing references) + //IL_069f: Expected O, but got Unknown + //IL_06a2: Unknown result type (might be due to invalid IL or missing references) + //IL_06ac: Expected O, but got Unknown + //IL_06b9: Unknown result type (might be due to invalid IL or missing references) + //IL_06c3: Expected O, but got Unknown + //IL_06c5: Unknown result type (might be due to invalid IL or missing references) + //IL_06d1: Unknown result type (might be due to invalid IL or missing references) + //IL_06db: Expected O, but got Unknown + //IL_06de: Unknown result type (might be due to invalid IL or missing references) + //IL_06e8: Expected O, but got Unknown + //IL_06ea: Unknown result type (might be due to invalid IL or missing references) + //IL_06f6: Unknown result type (might be due to invalid IL or missing references) + //IL_0700: Expected O, but got Unknown + //IL_0702: Unknown result type (might be due to invalid IL or missing references) + //IL_070e: Unknown result type (might be due to invalid IL or missing references) + //IL_0718: Expected O, but got Unknown + //IL_071b: Unknown result type (might be due to invalid IL or missing references) + //IL_0725: Expected O, but got Unknown + switch (connectionId) + { + case 1: + MainGrid = (Grid)target; + break; + case 2: + IncluirClienteButton = (MenuItem)target; + IncluirClienteButton.Click += new RoutedEventHandler(Incluir_OnClick); + break; + case 3: + ((MenuItem)target).Click += new RoutedEventHandler(Alterar_OnClick); + break; + case 4: + ((MenuItem)target).Click += new RoutedEventHandler(Salvar_OnClick); + break; + case 5: + ((MenuItem)target).Click += new RoutedEventHandler(Cancelar_OnClick); + break; + case 6: + ((MenuItem)target).Click += new RoutedEventHandler(Excluir_OnClick); + break; + case 7: + ((MenuItem)target).Click += new RoutedEventHandler(AbrirAquivoDigital_Click); + break; + case 8: + ((MenuItem)target).Click += new RoutedEventHandler(Tarefa_Click); + break; + case 9: + ((MenuItem)target).Click += new RoutedEventHandler(AbrirLog_OnClick); + break; + case 10: + ((MenuItem)target).Click += new RoutedEventHandler(AbrirLogEmail_OnClick); + break; + case 11: + ((MenuItem)target).Click += new RoutedEventHandler(MenuItem_Click); + break; + case 12: + TipoDocumentoPrincipalBox = (ComboBox)target; + break; + case 13: + DocumentoPrincipalBox = (TextBox)target; + ((UIElement)DocumentoPrincipalBox).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + ((UIElement)DocumentoPrincipalBox).LostFocus += new RoutedEventHandler(DocumentoPrincipalBox_LostFocus); + break; + case 14: + NomeBox = (TextBox)target; + break; + case 15: + NomeSocialBox = (TextBox)target; + break; + case 16: + ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); + ((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); + ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); + ((UIElement)(DatePicker)target).PreviewTextInput += new TextCompositionEventHandler(base.SomenteData); + break; + case 17: + CaepfBox = (TextBox)target; + break; + case 18: + RneBox = (TextBox)target; + break; + case 19: + CeiBox = (TextBox)target; + break; + case 20: + IdentidadeBox = (TextBox)target; + break; + case 21: + EmissorBox = (TextBox)target; + ((UIElement)EmissorBox).PreviewTextInput += new TextCompositionEventHandler(base.SomenteCaracteres); + break; + case 22: + EstadoEmissorBox = (TextBox)target; + ((UIElement)EstadoEmissorBox).PreviewTextInput += new TextCompositionEventHandler(base.SomenteCaracteres); + break; + case 23: + ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); + ((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); + ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); + ((UIElement)(DatePicker)target).PreviewTextInput += new TextCompositionEventHandler(base.SomenteData); + break; + case 24: + HabilitacaoBox = (TextBox)target; + ((UIElement)HabilitacaoBox).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 25: + CategoriaHabilitacaooBox = (TextBox)target; + ((UIElement)CategoriaHabilitacaooBox).PreviewTextInput += new TextCompositionEventHandler(LetrasHabilitacao); + break; + case 26: + ((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 27: + ((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 28: + SexoBox = (ComboBox)target; + break; + case 29: + EstadoCivilBox = (ComboBox)target; + break; + case 30: + AutoCompleteProfissao = (AutoCompleteBox)target; + AutoCompleteProfissao.Populating += new PopulatingEventHandler(AutoCompleteProfissaoBox_Populating); + break; + case 31: + AutoCompleteAtividade = (AutoCompleteBox)target; + AutoCompleteAtividade.Populating += new PopulatingEventHandler(AutoCompleteAtividadeBox_Populating); + break; + case 32: + ResponsavelBox = (TextBox)target; + ((UIElement)ResponsavelBox).LostFocus += new RoutedEventHandler(Validar_LostFocus); + break; + case 33: + DocumentoResponsavel = (TextBox)target; + ((UIElement)DocumentoResponsavel).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + ((UIElement)DocumentoResponsavel).LostFocus += new RoutedEventHandler(DocumentoPrincipalBox_LostFocus); + break; + case 34: + EmailBox = (TextBox)target; + ((UIElement)EmailBox).LostFocus += new RoutedEventHandler(Validar_LostFocus); + break; + case 35: + ((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 36: + PastaBox = (TextBox)target; + break; + case 37: + AutoCompleteBanco = (AutoCompleteBox)target; + AutoCompleteBanco.Populating += new PopulatingEventHandler(AutoCompleteBancoBox_Populating); + ((UIElement)AutoCompleteBanco).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(AutoCompleteBanco_OnLostKeyboardFocus); + break; + case 38: + AgenciaBox = (TextBox)target; + break; + case 39: + TipoContaBox = (TextBox)target; + break; + case 40: + ContaBox = (TextBox)target; + break; + case 41: + RendaMensalBox = (CurrencyTextBox)target; + break; + case 42: + ((MenuItem)target).Click += new RoutedEventHandler(IncluirTelefone_OnClick); + break; + case 43: + TelefoneListBox = (ListBox)target; + break; + case 49: + ((MenuItem)target).Click += new RoutedEventHandler(IncluirEmail_OnClick); + break; + case 50: + EmailListBox = (ListBox)target; + break; + case 53: + ((MenuItem)target).Click += new RoutedEventHandler(IncluirEndereco_OnClick); + break; + case 54: + EnderecoListBox = (ListBox)target; + break; + case 58: + VinculoBox = (AutoCompleteBox)target; + VinculoBox.Populating += new PopulatingEventHandler(AutoCompleteParentescoBox_Populating); + break; + case 59: + ((MenuItem)target).Click += new RoutedEventHandler(IncluirVinculo_OnClick); + break; + case 61: + NomeOrigemBox = (TextBox)target; + break; + case 62: + ((MenuItem)target).Click += new RoutedEventHandler(IncluirOrigem_OnClick); + break; + case 64: + ((MenuItem)target).Click += new RoutedEventHandler(IncluirMaisContatos_OnClick); + break; + case 65: + ContatosListBox = (ListBox)target; + break; + default: + _contentLoaded = true; + break; + } + } + + [DebuggerNonUserCode] + [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] + [EditorBrowsable(EditorBrowsableState.Never)] + void IStyleConnector.Connect(int connectionId, object target) + { + //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_00a0: Unknown result type (might be due to invalid IL or missing references) + //IL_00aa: Expected O, but got Unknown + //IL_00ac: 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_00c4: 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_00f4: Unknown result type (might be due to invalid IL or missing references) + //IL_0100: Unknown result type (might be due to invalid IL or missing references) + //IL_010a: Expected O, but got Unknown + //IL_010b: Unknown result type (might be due to invalid IL or missing references) + //IL_0118: Unknown result type (might be due to invalid IL or missing references) + //IL_0122: Expected O, but got Unknown + //IL_0124: Unknown result type (might be due to invalid IL or missing references) + //IL_0130: Unknown result type (might be due to invalid IL or missing references) + //IL_013a: Expected O, but got Unknown + //IL_013c: Unknown result type (might be due to invalid IL or missing references) + //IL_0148: Unknown result type (might be due to invalid IL or missing references) + //IL_0152: 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_016a: Unknown result type (might be due to invalid IL or missing references) + //IL_0177: Unknown result type (might be due to invalid IL or missing references) + //IL_0181: Expected O, but got Unknown + //IL_0183: Unknown result type (might be due to invalid IL or missing references) + //IL_018f: Unknown result type (might be due to invalid IL or missing references) + //IL_0199: Expected O, but got Unknown + //IL_019b: Unknown result type (might be due to invalid IL or missing references) + //IL_01a7: Unknown result type (might be due to invalid IL or missing references) + //IL_01b1: Expected O, but got Unknown + //IL_01b2: Unknown result type (might be due to invalid IL or missing references) + //IL_01bf: Unknown result type (might be due to invalid IL or missing references) + //IL_01c9: Expected O, but got Unknown + //IL_01cb: Unknown result type (might be due to invalid IL or missing references) + //IL_01d7: Unknown result type (might be due to invalid IL or missing references) + //IL_01e1: Expected O, but got Unknown + //IL_01e2: Unknown result type (might be due to invalid IL or missing references) + //IL_01ee: Unknown result type (might be due to invalid IL or missing references) + //IL_01f8: Expected O, but got Unknown + //IL_01f9: Unknown result type (might be due to invalid IL or missing references) + //IL_0206: Unknown result type (might be due to invalid IL or missing references) + //IL_0210: Expected O, but got Unknown + //IL_0212: Unknown result type (might be due to invalid IL or missing references) + //IL_021e: Unknown result type (might be due to invalid IL or missing references) + //IL_0228: Expected O, but got Unknown + //IL_022a: Unknown result type (might be due to invalid IL or missing references) + //IL_0236: Unknown result type (might be due to invalid IL or missing references) + //IL_0240: Expected O, but got Unknown + //IL_0242: Unknown result type (might be due to invalid IL or missing references) + //IL_024e: Unknown result type (might be due to invalid IL or missing references) + //IL_0258: Expected O, but got Unknown + //IL_025a: Unknown result type (might be due to invalid IL or missing references) + //IL_0267: Unknown result type (might be due to invalid IL or missing references) + //IL_0271: Expected O, but got Unknown + //IL_0273: Unknown result type (might be due to invalid IL or missing references) + //IL_027f: Unknown result type (might be due to invalid IL or missing references) + //IL_0289: Expected O, but got Unknown + //IL_028a: Unknown result type (might be due to invalid IL or missing references) + //IL_0296: Unknown result type (might be due to invalid IL or missing references) + //IL_02a0: Expected O, but got Unknown + //IL_02a1: Unknown result type (might be due to invalid IL or missing references) + //IL_02ad: Unknown result type (might be due to invalid IL or missing references) + //IL_02b7: Expected O, but got Unknown + //IL_02b8: Unknown result type (might be due to invalid IL or missing references) + //IL_02c4: Unknown result type (might be due to invalid IL or missing references) + //IL_02ce: Expected O, but got Unknown + //IL_02d0: Unknown result type (might be due to invalid IL or missing references) + //IL_02dc: Unknown result type (might be due to invalid IL or missing references) + //IL_02e6: Expected O, but got Unknown + //IL_02e8: Unknown result type (might be due to invalid IL or missing references) + //IL_02f5: Unknown result type (might be due to invalid IL or missing references) + //IL_02ff: Expected O, but got Unknown + //IL_0301: Unknown result type (might be due to invalid IL or missing references) + //IL_030e: Unknown result type (might be due to invalid IL or missing references) + //IL_0318: Expected O, but got Unknown + //IL_0319: Unknown result type (might be due to invalid IL or missing references) + //IL_0326: Unknown result type (might be due to invalid IL or missing references) + //IL_0330: Expected O, but got Unknown + //IL_0332: Unknown result type (might be due to invalid IL or missing references) + //IL_033e: Unknown result type (might be due to invalid IL or missing references) + //IL_0348: Expected O, but got Unknown + switch (connectionId) + { + case 44: + ((Selector)(ComboBox)target).SelectionChanged += new SelectionChangedEventHandler(TipoComboBox_OnSelectionChanged); + break; + case 45: + ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 46: + ((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(FormatarTelefone); + ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 47: + ((UIElement)(TextBox)target).PreviewGotKeyboardFocus += new KeyboardFocusChangedEventHandler(OrdemBox_OnPreviewGotKeyboardFocus); + ((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(OrdemBox_OnLostFocus); + ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 48: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(ExcluirTelefone_OnClick); + break; + case 51: + ((UIElement)(TextBox)target).PreviewGotKeyboardFocus += new KeyboardFocusChangedEventHandler(OrdemBox_OnPreviewGotKeyboardFocus); + ((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(OrdemBox_OnLostFocus); + ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 52: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(ExcluirEmail_OnClick); + break; + case 55: + ((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(PostcodeBox_OnLostFocus); + ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 56: + ((UIElement)(TextBox)target).PreviewGotKeyboardFocus += new KeyboardFocusChangedEventHandler(OrdemBox_OnPreviewGotKeyboardFocus); + ((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(OrdemBox_OnLostFocus); + ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 57: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(ExcluirEndereco_OnClick); + break; + case 60: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(ExcluirVinculo_OnClick); + break; + case 63: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(ExcluirOrigem_OnClick); + break; + case 66: + ((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(FormatarDocumento); + break; + case 67: + ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); + ((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); + ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); + ((UIElement)(DatePicker)target).PreviewTextInput += new TextCompositionEventHandler(base.SomenteData); + break; + case 68: + ((Selector)(ComboBox)target).SelectionChanged += new SelectionChangedEventHandler(TipoComboBox_OnSelectionChanged); + break; + case 69: + ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 70: + ((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(FormatarTelefone); + ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 71: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(ExcluirMaisContatos_OnClick); + break; + case 49: + case 50: + case 53: + case 54: + case 58: + case 59: + case 61: + case 62: + case 64: + case 65: + break; + } + } +} |