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.Input; using System.Windows.Markup; using System.Windows.Threading; 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.Ferramentas; using Gestor.Application.Views.Generic; using Gestor.Common.Validation; using Gestor.Model.Common; using Gestor.Model.Domain.Ferramentas; using Gestor.Model.Domain.Generic; using Gestor.Model.Domain.Seguros; using MaterialDesignThemes.Wpf; namespace Gestor.Application.Views.Seguros; public class SinistroView : BaseUserControl, IComponentConnector { public SinistroViewModel ViewModel; internal DataGrid ControleGrid; internal MenuItem SalvarSinistroButton; internal MenuItem CancelarApoliceButton; internal CustomIsReadOnlyControl TipoSinistroBox; internal ComboBox ParceiroMecanica; internal ComboBox ParceiroFunilaria; internal RadioButton AnotacoesButton; internal RadioButton AnotacoesInternasButton; internal CustomItemControl AnotacoesHoster; internal WebEditor Anotacoes; internal CustomItemControl ObservacoesHoster; internal WebEditor Observacoes; internal CustomItemControl AnotacoesInternasHoster; internal WebEditor AnotacoesInternas; internal CustomItemControl ObservacoesInternasHoster; internal WebEditor ObservacoesInternas; internal Snackbar Snackbar; private bool _contentLoaded; public SinistroView(Item item = null, bool attached = true) { item = item ?? ConsultaViewModel.ItemSelecionado; ((FrameworkElement)this).Tag = "CADASTRO DE SINISTRO"; ViewModel = new SinistroViewModel(item, attached); ((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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: 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 ((Selector)ControleGrid).SelectionChanged += new SelectionChangedEventHandler(SinistroGrid_OnSelectionChanged); ((ToggleButton)AnotacoesButton).IsChecked = ViewModel.IsAnotacoes; ((ToggleButton)AnotacoesInternasButton).IsChecked = !ViewModel.IsAnotacoes; ToggleAnotacoes(ViewModel.IsAnotacoes); ((ToggleButton)AnotacoesButton).Checked += new RoutedEventHandler(Anotacoes_OnChecked); ((ToggleButton)AnotacoesInternasButton).Checked += new RoutedEventHandler(AnotacoesInternas_OnChecked); } private void ToggleAnotacoes(bool anotacoes, bool inclusao = false) { if (anotacoes) { ViewModel.IsAnotacoes = true; if (ViewModel.EnableFields || inclusao) { ((UIElement)AnotacoesHoster).Visibility = (Visibility)0; ((UIElement)AnotacoesInternasHoster).Visibility = (Visibility)2; } else { ((UIElement)AnotacoesHoster).Visibility = (Visibility)2; ((UIElement)AnotacoesInternasHoster).Visibility = (Visibility)2; } } else { ViewModel.IsAnotacoes = false; if (ViewModel.EnableFields || inclusao) { ((UIElement)AnotacoesHoster).Visibility = (Visibility)2; ((UIElement)AnotacoesInternasHoster).Visibility = (Visibility)0; } else { ((UIElement)AnotacoesHoster).Visibility = (Visibility)2; ((UIElement)AnotacoesInternasHoster).Visibility = (Visibility)2; } } } private void Anotacoes_OnChecked(object sender, RoutedEventArgs e) { ToggleAnotacoes(anotacoes: true); } private void AnotacoesInternas_OnChecked(object sender, RoutedEventArgs e) { ToggleAnotacoes(anotacoes: false); } private void ItemGrid_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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown DataGrid val = (DataGrid)sender; if (val == null || ((Selector)val).SelectedIndex >= 0) { ViewModel.SelecionaItem((Item)((val != null) ? ((ItemsControl)val).Items[((Selector)val).SelectedIndex] : null)); } } private void AutoCompleteBoxItem_Populating(object sender, PopulatingEventArgs e) { e.Cancel = true; ViewModel.ItemFiltrar(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate(Task> 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 AutoCompleteBoxItem_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.FiltrarItem(""); } } private void SinistroGrid_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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown DataGrid val = (DataGrid)sender; if (val == null || ((Selector)val).SelectedIndex >= 0) { ViewModel.SelecionaControle((ControleSinistro)((val != null) ? ((ItemsControl)val).Items[((Selector)val).SelectedIndex] : null)); } } private void AutoCompleteBoxSinistro_Populating(object sender, PopulatingEventArgs e) { e.Cancel = true; ViewModel.SinistroFiltrar(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate(Task> 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 AutoCompleteBoxSinistro_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.FiltrarSinistro(""); } } private async void Incluir_OnClick(object sender, RoutedEventArgs e) { if (ViewModel.SelectedItem == null) { await ViewModel.ShowMessage("NECESSÁRIO INCLUIR O ITEM ANTES DE INCLUIR UM SINISTRO."); return; } await ViewModel.IncluirSinistro(); List> errorMessages = ViewModel.SelectedSinistro.Validate(); ((DependencyObject)(object)this).ValidateFields(errorMessages); ToggleAnotacoes(ViewModel.IsAnotacoes); } private void IncluirEnvolvido_OnClick(object sender, RoutedEventArgs e) { //IL_0091: 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_009a: Unknown result type (might be due to invalid IL or missing references) ViewModel.IncluirEnvolvido(); CustomIsReadOnlyControl tipoSinistroBox = TipoSinistroBox; ControleSinistro selectedControle = ViewModel.SelectedControle; int isEnabled; if (selectedControle == null || selectedControle.Sinistros?.Any((Sinistro x) => x.TipoSinistro == (TipoSinistro?)0) != false) { Sinistro selectedSinistro = ViewModel.SelectedSinistro; isEnabled = ((selectedSinistro != null && selectedSinistro.TipoSinistro == (TipoSinistro?)0) ? 1 : 0); } else { isEnabled = 1; } ((UIElement)tipoSinistroBox).IsEnabled = (byte)isEnabled != 0; Sinistro selectedSinistro2 = ViewModel.SelectedSinistro; List> errorMessages = ((selectedSinistro2 != null) ? selectedSinistro2.Validate() : null); ((DependencyObject)(object)this).ValidateFields(errorMessages); ToggleAnotacoes(ViewModel.IsAnotacoes, inclusao: true); } private void Alterar_OnClick(object sender, RoutedEventArgs e) { //IL_009f: 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_00a8: Unknown result type (might be due to invalid IL or missing references) if (ViewModel.SelectedSinistro != null) { ViewModel.Alterar(alterar: true); CustomIsReadOnlyControl tipoSinistroBox = TipoSinistroBox; ControleSinistro selectedControle = ViewModel.SelectedControle; int isEnabled; if (selectedControle == null || selectedControle.Sinistros?.Any((Sinistro x) => x.TipoSinistro == (TipoSinistro?)0) != false) { Sinistro selectedSinistro = ViewModel.SelectedSinistro; isEnabled = ((selectedSinistro != null && selectedSinistro.TipoSinistro == (TipoSinistro?)0) ? 1 : 0); } else { isEnabled = 1; } ((UIElement)tipoSinistroBox).IsEnabled = (byte)isEnabled != 0; ToggleAnotacoes(ViewModel.IsAnotacoes); Sinistro selectedSinistro2 = ViewModel.SelectedSinistro; if (selectedSinistro2 != null) { ((DomainBase)selectedSinistro2).Initialize(); } } } private async void Salvar_OnClick(object sender, RoutedEventArgs e) { ViewModel.Loading(isLoading: true); ViewModel.Anotacoes = Anotacoes.GetHtml(); ViewModel.AnotacoesInternas = AnotacoesInternas.GetHtml(); if (ViewModel.EditarObservacao) { ViewModel.SelectedSinistro.ObservacaoInterna = ObservacoesInternas.GetHtml(); ViewModel.SelectedSinistro.Observacao = Observacoes.GetHtml(); } List> list = await ViewModel.Salvar(); ((DependencyObject)(object)this).ValidateFields(list); bool num = list == null || list.Count == 0; ViewModel.Loading(isLoading: false); if (num) { Anotacoes.Initialize(); AnotacoesInternas.Initialize(); ToggleAnotacoes(ViewModel.IsAnotacoes); } else { await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK"); } } private void Cancelar_OnClick(object sender, RoutedEventArgs e) { ViewModel.CancelarAlteracao(); Anotacoes.Initialize(); AnotacoesInternas.Initialize(); ViewModel.EnableFields = false; ToggleAnotacoes(ViewModel.IsAnotacoes); } private void Excluir_OnClick(object sender, RoutedEventArgs e) { ViewModel.Excluir(); } private async void ArquivoDigital_OnClick(object sender, RoutedEventArgs e) { if (!new PermissaoArquivoDigitalServico().BuscarPermissao(Recursos.Usuario, (TipoArquivoDigital)5).Consultar) { await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ACESSAR\nARQUIVO DIGITAL DE " + ValidationHelper.GetDescription((Enum)(object)(TipoArquivoDigital)5) + "."); return; } FiltroArquivoDigital filtro = new FiltroArquivoDigital { Id = ((DomainBase)ViewModel.SelectedSinistro).Id, IdApolice = ((DomainBase)ViewModel.SelectedSinistro.ControleSinistro.Item.Documento).Id, Tipo = (TipoArquivoDigital)5, Parente = ViewModel.SelectedSinistro }; ViewModel.ShowDrawer(new ArquivoDigitalDrawer(filtro), 0, close: false); } private async void Tarefas_OnClick(object sender, RoutedEventArgs e) { Cliente val = await ViewModel.BuscarClienteSinistro(); Tarefa tarefa = new Tarefa { IdCliente = ((DomainBase)ViewModel.SelectedSinistro).Id, Cliente = val.Nome, Entidade = (TipoTarefa)4, IdEntidade = ((DomainBase)ViewModel.SelectedSinistro).Id, Titulo = "SINISTRO " + ViewModel.SelectedSinistro.Numero + " ITEM " + ViewModel.SelectedSinistro.ItemSinistrado }; ViewModel.ShowDrawer(new TarefaDrawer(tarefa), 0, close: false); } private void ParceiroBox_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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown ComboBox val = (ComboBox)sender; if (val == null || ((Selector)val).SelectedItem == null) { return; } Parceiro val2 = (Parceiro)((Selector)val).SelectedItem; if (((FrameworkElement)val).Name == "ParceiroMecanica") { if (ViewModel.SelectedSinistro.SinistroAuto.ParceiroMecanica == null) { ViewModel.SelectedSinistro.SinistroAuto.ParceiroMecanica = val2; } ParceiroMecanica.Text = val2.Nome; ViewModel.TelefonesMecanica = ""; bool flag = true; if (!string.IsNullOrWhiteSpace(val2.Ddd1) || !string.IsNullOrWhiteSpace(val2.Telefone1)) { flag = false; SinistroViewModel viewModel = ViewModel; viewModel.TelefonesMecanica = viewModel.TelefonesMecanica + "TELEFONE 1: (" + val2.Ddd1 + ") " + ValidationHelper.FormatarTelefone(val2.Telefone1); } if (!string.IsNullOrWhiteSpace(val2.Ddd2) || !string.IsNullOrWhiteSpace(val2.Telefone2)) { flag = false; SinistroViewModel viewModel = ViewModel; viewModel.TelefonesMecanica = viewModel.TelefonesMecanica + "\nTELEFONE 2: (" + val2.Ddd2 + ") " + ValidationHelper.FormatarTelefone(val2.Telefone2); } if (!string.IsNullOrWhiteSpace(val2.Ddd3) || !string.IsNullOrWhiteSpace(val2.Telefone3)) { flag = false; SinistroViewModel viewModel = ViewModel; viewModel.TelefonesMecanica = viewModel.TelefonesMecanica + "\nTELEFONE 3: (" + val2.Ddd3 + ") " + ValidationHelper.FormatarTelefone(val2.Telefone3); } if (!string.IsNullOrWhiteSpace(val2.Endereco) || !string.IsNullOrWhiteSpace(val2.Cidade) || !string.IsNullOrWhiteSpace(val2.Uf) || !string.IsNullOrWhiteSpace(val2.Bairro) || !string.IsNullOrWhiteSpace(val2.Cep) || !string.IsNullOrWhiteSpace(val2.Numero) || !string.IsNullOrWhiteSpace(val2.Complemento)) { flag = false; SinistroViewModel viewModel = ViewModel; viewModel.TelefonesMecanica = viewModel.TelefonesMecanica + "\nENDEREÇO: " + val2.Endereco + ", " + val2.Numero + ", " + (string.IsNullOrWhiteSpace(val2.Complemento) ? "-" : (val2.Complemento ?? "")) + ", " + val2.Bairro + ", " + val2.Cidade + "/" + val2.Uf + " - " + val2.Cep; } if (!string.IsNullOrWhiteSpace(val2.Email)) { flag = false; SinistroViewModel viewModel2 = ViewModel; viewModel2.TelefonesMecanica = viewModel2.TelefonesMecanica + "\nEMAIL: " + val2.Email; } if (!string.IsNullOrWhiteSpace(val2.Cgccpf)) { flag = false; SinistroViewModel viewModel3 = ViewModel; viewModel3.TelefonesMecanica = viewModel3.TelefonesMecanica + "\nDOCUMENTO: " + val2.Cgccpf; } if (flag) { ViewModel.TelefonesMecanica = "PARCEIRO SEM MAIS INFORMAÇÕES"; } } else { if (ViewModel.SelectedSinistro.SinistroAuto.ParceiroFunilaria == null) { ViewModel.SelectedSinistro.SinistroAuto.ParceiroFunilaria = val2; } ParceiroFunilaria.Text = val2.Nome; ViewModel.TelefonesFunileiro = ""; bool flag2 = true; if (!string.IsNullOrWhiteSpace(val2.Ddd1) || !string.IsNullOrWhiteSpace(val2.Telefone1)) { flag2 = false; SinistroViewModel viewModel = ViewModel; viewModel.TelefonesFunileiro = viewModel.TelefonesFunileiro + "TELEFONE 1: (" + val2.Ddd1 + ") " + ValidationHelper.FormatarTelefone(val2.Telefone1); } if (!string.IsNullOrWhiteSpace(val2.Ddd2) || !string.IsNullOrWhiteSpace(val2.Telefone2)) { flag2 = false; SinistroViewModel viewModel = ViewModel; viewModel.TelefonesFunileiro = viewModel.TelefonesFunileiro + "\nTELEFONE 2: (" + val2.Ddd2 + ") " + ValidationHelper.FormatarTelefone(val2.Telefone2); } if (!string.IsNullOrWhiteSpace(val2.Ddd3) || !string.IsNullOrWhiteSpace(val2.Telefone3)) { flag2 = false; SinistroViewModel viewModel = ViewModel; viewModel.TelefonesFunileiro = viewModel.TelefonesFunileiro + "\nTELEFONE 3: (" + val2.Ddd3 + ") " + ValidationHelper.FormatarTelefone(val2.Telefone3); } if (!string.IsNullOrWhiteSpace(val2.Endereco) || !string.IsNullOrWhiteSpace(val2.Cidade) || !string.IsNullOrWhiteSpace(val2.Uf) || !string.IsNullOrWhiteSpace(val2.Bairro) || !string.IsNullOrWhiteSpace(val2.Cep) || !string.IsNullOrWhiteSpace(val2.Numero) || !string.IsNullOrWhiteSpace(val2.Complemento)) { flag2 = false; SinistroViewModel viewModel = ViewModel; viewModel.TelefonesFunileiro = viewModel.TelefonesFunileiro + "\nENDEREÇO: " + val2.Endereco + ", " + val2.Numero + ", " + (string.IsNullOrWhiteSpace(val2.Complemento) ? "-" : (val2.Complemento ?? "")) + ", " + val2.Bairro + ", " + val2.Cidade + "/" + val2.Uf + " - " + val2.Cep; } if (!string.IsNullOrWhiteSpace(val2.Email)) { flag2 = false; SinistroViewModel viewModel4 = ViewModel; viewModel4.TelefonesFunileiro = viewModel4.TelefonesFunileiro + "\nEMAIL: " + val2.Email; } if (!string.IsNullOrWhiteSpace(val2.Cgccpf)) { flag2 = false; SinistroViewModel viewModel5 = ViewModel; viewModel5.TelefonesFunileiro = viewModel5.TelefonesFunileiro + "\nDOCUMENTO: " + val2.Cgccpf; } if (flag2) { ViewModel.TelefonesFunileiro = "PARCEIRO SEM MAIS INFORMAÇÕES"; } } } private void SituacaoBox_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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Invalid comparison between Unknown and I4 ComboBox val = (ComboBox)sender; if (val != null && ((Selector)val).SelectedItem != null) { if ((int)(StatusSinistro)((Selector)val).SelectedItem != 1) { ViewModel.LiquidacaoVisibility = (Visibility)0; } else { ViewModel.SelectedSinistro.DataLiquidacao = null; ViewModel.LiquidacaoVisibility = (Visibility)2; } Validar(); } } private void Validar() { if (ViewModel.SelectedSinistro != null) { List> errorMessages = ViewModel.SelectedSinistro.Validate(); ((DependencyObject)(object)this).ValidateFields(errorMessages, focusField: false); } } private void ImprimirHistorico_OnClick(object sender, RoutedEventArgs e) { if (((DomainBase)ViewModel.SelectedSinistro).Id != 0L) { ViewModel.ImprimirHistorico(); } } private void AbrirLogEmail_OnClick(object sender, RoutedEventArgs e) { if (ViewModel.SelectedSinistro != null) { ViewModel.AbrirLogEmail((TipoTela)7, ((DomainBase)ViewModel.SelectedSinistro).Id); } } private void EnviarHistorico_OnClick(object sender, RoutedEventArgs e) { ViewModel.EnviarLogEmail(); } private void SnackbarMessage_ActionClick(object sender, RoutedEventArgs e) { Snackbar.IsActive = false; } private void MecanicaButton_OnClick(object sender, RoutedEventArgs e) { //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) CadastroParceiroView view = new CadastroParceiroView((ViewModel.SelectedSinistro.SinistroAuto.ParceiroMecanica == null || ((DomainBase)ViewModel.SelectedSinistro.SinistroAuto.ParceiroMecanica).Id == 0L) ? null : ViewModel.SelectedSinistro.SinistroAuto.ParceiroMecanica); ((Window)new HosterWindow((ContentControl)(object)view, "CADASTRO DE PARCEIROS", 1000.0, 600.0)).ShowDialog(); Parceiro val = (Parceiro)((Selector)ParceiroFunilaria).SelectedItem; long id = (((int)val != 0) ? ((DomainBase)val).Id : 0); ViewModel.CarregarParceiros(); ((Selector)ParceiroFunilaria).SelectedItem = ((id <= 0) ? null : ViewModel.Parceiros?.FirstOrDefault((Func)((Parceiro x) => ((DomainBase)x).Id == id))); ((Selector)ParceiroMecanica).SelectedItem = ViewModel.Parceiros?.FirstOrDefault((Func)delegate(Parceiro x) { long id2 = ((DomainBase)x).Id; Parceiro selectedParceiro = view.ViewModel.SelectedParceiro; return id2 == ((selectedParceiro != null) ? new long?(((DomainBase)selectedParceiro).Id) : null); }); } private void FunilariaButton_OnClick(object sender, RoutedEventArgs e) { //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) CadastroParceiroView view = new CadastroParceiroView((ViewModel.SelectedSinistro.SinistroAuto.ParceiroFunilaria == null || ((DomainBase)ViewModel.SelectedSinistro.SinistroAuto.ParceiroFunilaria).Id == 0L) ? null : ViewModel.SelectedSinistro.SinistroAuto.ParceiroFunilaria); ((Window)new HosterWindow((ContentControl)(object)view, "CADASTRO DE PARCEIROS", 1000.0, 600.0)).ShowDialog(); Parceiro val = (Parceiro)((Selector)ParceiroMecanica).SelectedItem; long id = (((int)val != 0) ? ((DomainBase)val).Id : 0); ViewModel.CarregarParceiros(); ((Selector)ParceiroMecanica).SelectedItem = ((id <= 0) ? null : ViewModel.Parceiros?.FirstOrDefault((Func)((Parceiro x) => ((DomainBase)x).Id == id))); ((Selector)ParceiroFunilaria).SelectedItem = ViewModel.Parceiros?.FirstOrDefault((Func)delegate(Parceiro x) { long id2 = ((DomainBase)x).Id; Parceiro selectedParceiro = view.ViewModel.SelectedParceiro; return id2 == ((selectedParceiro != null) ? new long?(((DomainBase)selectedParceiro).Id) : null); }); } private void AbrirInfo_OnClick(object sender, RoutedEventArgs e) { ViewModel.AbrirInfo(); } private void Log_OnClick(object sender, RoutedEventArgs e) { ViewModel.AbrirLog((TipoTela)7, ((DomainBase)ViewModel.SelectedSinistro).Id); } [DebuggerNonUserCode] [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] public void InitializeComponent() { if (!_contentLoaded) { _contentLoaded = true; Uri uri = new Uri("/Gestor.Application;component/views/seguros/sinistroview.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_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_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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //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 //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Expected O, but got Unknown //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Expected O, but got Unknown //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Expected O, but got Unknown //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: 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_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Expected O, but got Unknown //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Expected O, but got Unknown //IL_0222: Unknown result type (might be due to invalid IL or missing references) //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_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 //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Expected O, but got Unknown //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Expected O, but got Unknown //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Expected O, but got Unknown //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Expected O, but got Unknown //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Expected O, but got Unknown //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Expected O, but got Unknown //IL_0302: 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_0325: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Expected O, but got Unknown //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Expected O, but got Unknown //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Expected O, but got Unknown //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Expected O, but got Unknown //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Expected O, but got Unknown //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Expected O, but got Unknown //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Expected O, but got Unknown //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //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_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Expected O, but got Unknown //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Expected O, but got Unknown //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Expected O, but got Unknown //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Expected O, but got Unknown //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Expected O, but got Unknown //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Expected O, but got Unknown //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Expected O, but got Unknown //IL_04d4: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Expected O, but got Unknown //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Expected O, but got Unknown switch (connectionId) { case 1: ((AutoCompleteBox)target).Populating += new PopulatingEventHandler(AutoCompleteBoxSinistro_Populating); ((AutoCompleteBox)target).TextChanged += new RoutedEventHandler(AutoCompleteBoxSinistro_OnTextChanged); break; case 2: ControleGrid = (DataGrid)target; break; case 3: ((MenuItem)target).Click += new RoutedEventHandler(Incluir_OnClick); break; case 4: ((MenuItem)target).Click += new RoutedEventHandler(Incluir_OnClick); break; case 5: ((MenuItem)target).Click += new RoutedEventHandler(IncluirEnvolvido_OnClick); break; case 6: ((MenuItem)target).Click += new RoutedEventHandler(Alterar_OnClick); break; case 7: SalvarSinistroButton = (MenuItem)target; SalvarSinistroButton.Click += new RoutedEventHandler(Salvar_OnClick); break; case 8: CancelarApoliceButton = (MenuItem)target; CancelarApoliceButton.Click += new RoutedEventHandler(Cancelar_OnClick); break; case 9: ((MenuItem)target).Click += new RoutedEventHandler(Excluir_OnClick); break; case 10: ((MenuItem)target).Click += new RoutedEventHandler(Tarefas_OnClick); break; case 11: ((MenuItem)target).Click += new RoutedEventHandler(ArquivoDigital_OnClick); break; case 12: ((MenuItem)target).Click += new RoutedEventHandler(ImprimirHistorico_OnClick); break; case 13: ((MenuItem)target).Click += new RoutedEventHandler(EnviarHistorico_OnClick); break; case 14: ((MenuItem)target).Click += new RoutedEventHandler(Log_OnClick); break; case 15: ((MenuItem)target).Click += new RoutedEventHandler(AbrirLogEmail_OnClick); break; case 16: ((MenuItem)target).Click += new RoutedEventHandler(AbrirInfo_OnClick); break; case 17: TipoSinistroBox = (CustomIsReadOnlyControl)target; break; case 18: ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); ((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); break; case 19: ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); ((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); break; case 20: ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); ((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); break; case 21: ((Selector)(ComboBox)target).SelectionChanged += new SelectionChangedEventHandler(SituacaoBox_OnSelectionChanged); break; case 22: ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); ((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); break; case 23: ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); break; case 24: ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); ((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(FormatarTelefone); break; case 25: ParceiroMecanica = (ComboBox)target; ((Selector)ParceiroMecanica).SelectionChanged += new SelectionChangedEventHandler(ParceiroBox_OnSelectionChanged); break; case 26: ((ButtonBase)(Button)target).Click += new RoutedEventHandler(MecanicaButton_OnClick); break; case 27: ParceiroFunilaria = (ComboBox)target; ((Selector)ParceiroFunilaria).SelectionChanged += new SelectionChangedEventHandler(ParceiroBox_OnSelectionChanged); break; case 28: ((ButtonBase)(Button)target).Click += new RoutedEventHandler(FunilariaButton_OnClick); break; case 29: AnotacoesButton = (RadioButton)target; break; case 30: AnotacoesInternasButton = (RadioButton)target; break; case 31: AnotacoesHoster = (CustomItemControl)target; break; case 32: Anotacoes = (WebEditor)target; break; case 33: ObservacoesHoster = (CustomItemControl)target; break; case 34: Observacoes = (WebEditor)target; break; case 35: AnotacoesInternasHoster = (CustomItemControl)target; break; case 36: AnotacoesInternas = (WebEditor)target; break; case 37: ObservacoesInternasHoster = (CustomItemControl)target; break; case 38: ObservacoesInternas = (WebEditor)target; break; case 39: Snackbar = (Snackbar)target; break; case 40: ((SnackbarMessage)target).ActionClick += new RoutedEventHandler(SnackbarMessage_ActionClick); break; default: _contentLoaded = true; break; } } }