diff options
| author | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 15:29:41 +0000 |
|---|---|---|
| committer | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 15:29:41 +0000 |
| commit | 225aa1499e37faf9d38257caabbadc68d78b427e (patch) | |
| tree | 102bb7a40c58595348ae9d3c7076201759fe0720 /Decompiler/Gestor.Application.Views.Seguros.Itens/AutoView.cs | |
| parent | 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (diff) | |
| download | gestor-225aa1499e37faf9d38257caabbadc68d78b427e.tar.gz gestor-225aa1499e37faf9d38257caabbadc68d78b427e.zip | |
decompiler.com
Diffstat (limited to 'Decompiler/Gestor.Application.Views.Seguros.Itens/AutoView.cs')
| -rw-r--r-- | Decompiler/Gestor.Application.Views.Seguros.Itens/AutoView.cs | 660 |
1 files changed, 660 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.Views.Seguros.Itens/AutoView.cs b/Decompiler/Gestor.Application.Views.Seguros.Itens/AutoView.cs new file mode 100644 index 0000000..f5a5284 --- /dev/null +++ b/Decompiler/Gestor.Application.Views.Seguros.Itens/AutoView.cs @@ -0,0 +1,660 @@ +using System; +using System.CodeDom.Compiler; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.Linq; +using System.Text.RegularExpressions; +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.Actions; +using Gestor.Application.Componentes; +using Gestor.Application.Drawers; +using Gestor.Application.Helpers; +using Gestor.Application.Servicos; +using Gestor.Application.ViewModels; +using Gestor.Application.ViewModels.Seguros; +using Gestor.Application.ViewModels.Seguros.Itens; +using Gestor.Application.Views.Generic; +using Gestor.Common.Validation; +using Gestor.Model.Common; +using Gestor.Model.Domain.Common; +using Gestor.Model.Domain.Configuracoes; +using Gestor.Model.Domain.Generic; +using Gestor.Model.Domain.Seguros; +using Gestor.Model.Helper; + +namespace Gestor.Application.Views.Seguros.Itens; + +public class AutoView : BaseUserControl, IComponentConnector +{ + public AutoViewModel ViewModel; + + private readonly MenuItemViewModel _menuItemViewModel; + + internal MenuItem IncluirItemButton; + + internal MenuItem SinistroButton; + + internal WrapPanel PainelDadosAuto; + + internal TextBox FipeBox; + + internal AutoCompleteBox AutoCompleteFabricacao; + + internal TextBox ModeloBox; + + internal TextBox AnoModeloBox; + + internal TextBox CepCirculacaoBox; + + internal TextBox CepPernoiteBox; + + internal ComboBox ComboBoxTipoCorrecao; + + internal RadioButton CoberturasRadioButton; + + internal RadioButton MaisInformacoesRadioButton; + + internal ContentControl ContentControl; + + internal CustomItemValidation MaisInformacoes; + + private bool _contentLoaded; + + public AutoView(MenuItemViewModel menuItemViewModel, bool lockInsert = false, bool substituir = false, ManutencaoItem manutencao = null, Item itemSelecionado = null, Ramo ramo = null, bool endossoRenovacao = false) + { + _menuItemViewModel = menuItemViewModel; + ViewModel = new AutoViewModel(substituir, manutencao, itemSelecionado, ramo, endossoRenovacao); + ((FrameworkElement)this).DataContext = ViewModel; + InitializeComponent(); + Dispatcher dispatcher = ((DispatcherObject)this).Dispatcher; + if (dispatcher != null) + { + dispatcher.BeginInvoke((DispatcherPriority)7, (Delegate)new Action(ContentLoad)); + } + if (lockInsert) + { + ((UIElement)IncluirItemButton).IsEnabled = false; + ((UIElement)SinistroButton).Visibility = (Visibility)2; + } + } + + public async Task Selecionar(Item item) + { + await ViewModel.SelecionaItem(item); + } + + public void Manter(ManutencaoItem manutencao) + { + ViewModel.Manter(ConsultaViewModel.ItemSelecionado, manutencao); + } + + public void Substituir() + { + ViewModel.Substituir(ConsultaViewModel.ItemSelecionado); + } + + private void ContentLoad() + { + //IL_000d: Unknown result type (might be due to invalid IL or missing references) + //IL_0017: Expected O, but got Unknown + //IL_0024: Unknown result type (might be due to invalid IL or missing references) + //IL_002e: Expected O, but got Unknown + ((ToggleButton)CoberturasRadioButton).Checked += new RoutedEventHandler(Documento_OnChecked); + ((ToggleButton)MaisInformacoesRadioButton).Checked += new RoutedEventHandler(Documento_OnChecked); + } + + private void Documento_OnChecked(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 + RadioButton val = (RadioButton)sender; + if (!string.IsNullOrEmpty(val.GroupName)) + { + ViewModel.Descarregar(); + ((UIElement)ContentControl).Visibility = (Visibility)2; + ((UIElement)MaisInformacoes).Visibility = (Visibility)2; + ((DependencyObject)(object)MaisInformacoes).ClearInvalid(); + ((DependencyObject)(object)ContentControl).ClearInvalid(); + if (!(((FrameworkElement)val).Name == "MaisInformacoesRadioButton")) + { + ((UIElement)ContentControl).Visibility = (Visibility)0; + ViewModel.CarregaCobertura(); + } + else + { + ((UIElement)MaisInformacoes).Visibility = (Visibility)0; + } + } + } + + private async void Incluir_OnClick(object sender, RoutedEventArgs e) + { + await ViewModel.Incluir(); + List<KeyValuePair<string, string>> errorMessages = ViewModel.SelectedItem.Validate(Recursos.Configuracoes.Any((ConfiguracaoSistema x) => (int)x.Configuracao == 18), Recursos.Configuracoes.Any((ConfiguracaoSistema x) => (int)x.Configuracao == 27)); + ((DependencyObject)(object)this).ValidateFields(errorMessages); + } + + private async void Excluir_OnClick(object sender, RoutedEventArgs e) + { + if (await ViewModel.Excluir()) + { + _menuItemViewModel?.RecarregarItens(null); + } + } + + private void Cancelar_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.CancelarAlteracao(); + } + + public async void Salvar_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.Loading(isLoading: true); + ((UIElement)FipeBox).Focus(); + 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) + { + if (((DomainBase)ViewModel.SelectedItem).Id > 0) + { + _menuItemViewModel?.RecarregarItens(ViewModel.SelectedItem); + } + } + else + { + await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK"); + } + } + + private void Alterar_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.Alterar(alterar: true); + } + + private async void AbrirAquivoDigital_Click(object sender, RoutedEventArgs e) + { + if (!new PermissaoArquivoDigitalServico().BuscarPermissao(Recursos.Usuario, (TipoArquivoDigital)4).Consultar) + { + await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ACESSAR\nARQUIVO DIGITAL DE " + ValidationHelper.GetDescription((Enum)(object)(TipoArquivoDigital)4) + "."); + return; + } + FiltroArquivoDigital filtro = new FiltroArquivoDigital + { + Id = ((DomainBase)ViewModel.SelectedItem).Id, + IdApolice = ((DomainBase)ViewModel.SelectedItem.Documento).Id, + Tipo = (TipoArquivoDigital)4, + Parente = ViewModel.SelectedItem + }; + ViewModel.ShowDrawer(new ArquivoDigitalDrawer(filtro), 0, close: false); + } + + private void Cep_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; + Item selectedItem = ViewModel.SelectedItem; + if (((selectedItem != null) ? selectedItem.Auto : null) != null && !string.IsNullOrWhiteSpace(val.Text) && ((!(((FrameworkElement)val).Name == "CepCirculacaoBox") && !(((FrameworkElement)val).Name == "CepPernoiteBox")) || !ValidationHelper.ValidaCep(val.Text)) && ValidationHelper.ValidacaoCep(ValidationHelper.FormatPostCode(val.Text))) + { + val.Text = ValidationHelper.FormatPostCode(val.Text); + } + } + + private void AutoCompleteFabricanteBox_Populating(object sender, PopulatingEventArgs e) + { + if (e.Parameter.Length < 3) + { + return; + } + e.Cancel = true; + ViewModel.BuscaFabricante(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate(Task<List<Fabricante>> 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 async void Fipe_LostFocus(object sender, RoutedEventArgs e) + { + TextBox box = (TextBox)sender; + Item selectedItem = ViewModel.SelectedItem; + if (((selectedItem != null) ? selectedItem.Auto : null) == null || string.IsNullOrWhiteSpace(box.Text)) + { + return; + } + string text = ValidationHelper.FormataFipe(box.Text.Replace("-", "")); + if (!ValidationHelper.ValidaFipe(text)) + { + return; + } + box.Text = text; + if (int.TryParse(ValidationHelper.OnlyNumber(text), out var result) && result == 0) + { + return; + } + Fipe modelo = await ViewModel.BuscaModelo(box.Text); + if (modelo == null) + { + ViewModel.ToggleSnackBar("MODELO NÃO ENCONTRADO PARA O CÓDIGO FIPE " + box.Text); + return; + } + ModeloBox.Text = modelo.Modelo; + AutoCompleteFabricacao.SelectedItem = ViewModel.Fabricantes?.FirstOrDefault((Func<Fabricante, bool>)((Fabricante x) => x.Descricao == modelo.Marca)); + } + + private async void BuscarModelo_OnClick(object sender, RoutedEventArgs e) + { + Fipe fipe = await ViewModel.ShowBuscaModeloDialog(ModeloBox.Text, AnoModeloBox.Text); + if (fipe != null) + { + FipeBox.Text = fipe.Codigo; + ModeloBox.Text = fipe.Modelo; + AutoCompleteFabricacao.Text = fipe.Marca; + ViewModel.SelectedItem.Auto.Fabricante = ((IEnumerable<Fabricante>)ViewModel.Fabricantes).FirstOrDefault((Func<Fabricante, bool>)((Fabricante x) => x.Descricao == fipe.Marca)); + } + } + + private void AbrirLog_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.AbrirLog((TipoTela)3, ((DomainBase)ViewModel.SelectedItem).Id); + } + + private void AbrirLogEmail_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.AbrirLogEmail((TipoTela)3, ((DomainBase)ViewModel.SelectedItem).Id); + } + + private void ZeroKmToggleButton_Changed(object sender, RoutedEventArgs e) + { + if (ViewModel.SelectedItem != null) + { + List<KeyValuePair<string, string>> errorMessages = ViewModel.SelectedItem.Validate(); + ((DependencyObject)(object)this).ValidateFields(errorMessages); + } + } + + private void ComboBoxTipoCorrecao_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + if (((Selector)ComboBoxTipoCorrecao).SelectedItem != null) + { + ViewModel.Atualiza(((Selector)ComboBoxTipoCorrecao).SelectedItem.ToString().ToUpper()); + } + } + + private async void ImportarXls_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.Loading(isLoading: true); + Gestor.Application.Actions.Actions.EnablePesquisarClientes?.Invoke(obj: false); + Gestor.Application.Actions.Actions.EnableMenu?.Invoke(obj: false); + Gestor.Application.Actions.Actions.EnableMainMenu?.Invoke(obj: false); + List<KeyValuePair<string, string>> list = await ViewModel.ImportarXls(); + bool num = list == null || list.Count == 0; + Gestor.Application.Actions.Actions.EnablePesquisarClientes?.Invoke(obj: true); + Gestor.Application.Actions.Actions.EnableMenu?.Invoke(obj: true); + Gestor.Application.Actions.Actions.EnableMainMenu?.Invoke(obj: true); + ViewModel.Loading(isLoading: false); + if (num) + { + if (((DomainBase)ViewModel.SelectedItem).Id > 0) + { + _menuItemViewModel?.RecarregarItens(ViewModel.SelectedItem); + } + } + else + { + await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK"); + } + } + + private void BaixarXls_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.BaixarXls(); + } + + private void MenuItem_OnClick(object sender, RoutedEventArgs e) + { + ((Window)new HosterWindow((ContentControl)(object)new SinistroView(ViewModel.SelectedItem, attached: false), "CADASTRO DE SINISTROS - " + ViewModel.SelectedItem.Descricao)).ShowDialog(); + _menuItemViewModel?.RecarregarItens(ViewModel.SelectedItem); + } + + private void Renavam_OnLostFocus(object sender, RoutedEventArgs 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) + TextBox val = (TextBox)sender; + string text = ValidationHelper.FormatRenavam(val.Text); + val.Text = text; + } + + private void Ci_OnLostFocus(object sender, RoutedEventArgs 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) + TextBox val = (TextBox)sender; + string text = ValidationHelper.FormatCi(val.Text); + val.Text = text; + } + + private void CopyCodItem(object sender, MouseButtonEventArgs e) + { + ViewModel.CodigoItem.CopyToClipboard(); + ViewModel.ToggleSnackBar("COPIADO - " + ViewModel.CodigoItem); + } + + private void SelecionaUsoVeiculo(object sender, SelectionChangedEventArgs e) + { + //IL_000e: Unknown result type (might be due to invalid IL or missing references) + //IL_0014: Invalid comparison between Unknown and I4 + //IL_0024: Unknown result type (might be due to invalid IL or missing references) + //IL_002a: Invalid comparison between Unknown and I4 + if ((int)ViewModel.UsoVeiculo.GetValueOrDefault() == 2 || (int)ViewModel.UsoVeiculo.GetValueOrDefault() == 3) + { + ViewModel.SelectedItem.Auto.Categoria = (Categoria)3; + } + } + + private void KeyUpBase_OnKeyUp(object sender, KeyEventArgs 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 (!Regex.IsMatch(val.Text.Replace(".", ""), "^[0-9.]{11}$")) + { + val.Text = Regex.Replace(val.Text, "[^\\d]*", ""); + } + } + + private void Placa(object sender, KeyEventArgs e) + { + //IL_0001: Unknown result type (might be due to invalid IL or missing references) + ValidationHelper.FormataPlaca(((TextBox)sender).Text); + } + + [DebuggerNonUserCode] + [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() + { + if (!_contentLoaded) + { + _contentLoaded = true; + Uri uri = new Uri("/Gestor.Application;component/views/seguros/itens/autoview.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_0097: Unknown result type (might be due to invalid IL or missing references) + //IL_00a1: Expected O, but got Unknown + //IL_00ae: Unknown result type (might be due to invalid IL or missing references) + //IL_00b8: Expected O, but got Unknown + //IL_00ba: Unknown result type (might be due to invalid IL or missing references) + //IL_00c6: Unknown result type (might be due to invalid IL or missing references) + //IL_00d0: Expected O, but got Unknown + //IL_00d2: Unknown result type (might be due to invalid IL or missing references) + //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_016e: Unknown result type (might be due to invalid IL or missing references) + //IL_017a: Unknown result type (might be due to invalid IL or missing references) + //IL_0184: Expected O, but got Unknown + //IL_0186: Unknown result type (might be due to invalid IL or missing references) + //IL_0192: Unknown result type (might be due to invalid IL or missing references) + //IL_019c: Expected O, but got Unknown + //IL_019e: Unknown result type (might be due to invalid IL or missing references) + //IL_01aa: Unknown result type (might be due to invalid IL or missing references) + //IL_01b4: Expected O, but got Unknown + //IL_01b6: Unknown result type (might be due to invalid IL or missing references) + //IL_01c2: Unknown result type (might be due to invalid IL or missing references) + //IL_01cc: Expected O, but got Unknown + //IL_01cf: Unknown result type (might be due to invalid IL or missing references) + //IL_01d9: Expected O, but got Unknown + //IL_01dc: Unknown result type (might be due to invalid IL or missing references) + //IL_01e6: Expected O, but got Unknown + //IL_01f4: Unknown result type (might be due to invalid IL or missing references) + //IL_01fe: Expected O, but got Unknown + //IL_020b: Unknown result type (might be due to invalid IL or missing references) + //IL_0215: Expected O, but got Unknown + //IL_0217: Unknown result type (might be due to invalid IL or missing references) + //IL_0224: Unknown result type (might be due to invalid IL or missing references) + //IL_022e: Expected O, but got Unknown + //IL_022f: Unknown result type (might be due to invalid IL or missing references) + //IL_023b: Unknown result type (might be due to invalid IL or missing references) + //IL_0245: Expected O, but got Unknown + //IL_0248: Unknown result type (might be due to invalid IL or missing references) + //IL_0252: Expected O, but got Unknown + //IL_025f: Unknown result type (might be due to invalid IL or missing references) + //IL_0269: Expected O, but got Unknown + //IL_026c: Unknown result type (might be due to invalid IL or missing references) + //IL_0276: Expected O, but got Unknown + //IL_0278: Unknown result type (might be due to invalid IL or missing references) + //IL_0284: Unknown result type (might be due to invalid IL or missing references) + //IL_028e: Expected O, but got Unknown + //IL_0290: Unknown result type (might be due to invalid IL or missing references) + //IL_029c: Unknown result type (might be due to invalid IL or missing references) + //IL_02a6: Expected O, but got Unknown + //IL_02a8: Unknown result type (might be due to invalid IL or missing references) + //IL_02b5: Unknown result type (might be due to invalid IL or missing references) + //IL_02bf: Expected O, but got Unknown + //IL_02c0: Unknown result type (might be due to invalid IL or missing references) + //IL_02cc: Unknown result type (might be due to invalid IL or missing references) + //IL_02d6: Expected O, but got Unknown + //IL_02d7: Unknown result type (might be due to invalid IL or missing references) + //IL_02e3: Unknown result type (might be due to invalid IL or missing references) + //IL_02ed: Expected O, but got Unknown + //IL_02ef: Unknown result type (might be due to invalid IL or missing references) + //IL_02fb: Unknown result type (might be due to invalid IL or missing references) + //IL_0305: Expected O, but got Unknown + //IL_0306: Unknown result type (might be due to invalid IL or missing references) + //IL_0312: Unknown result type (might be due to invalid IL or missing references) + //IL_031c: Expected O, but got Unknown + //IL_031e: Unknown result type (might be due to invalid IL or missing references) + //IL_032b: Unknown result type (might be due to invalid IL or missing references) + //IL_0335: Expected O, but got Unknown + //IL_0338: Unknown result type (might be due to invalid IL or missing references) + //IL_0342: Expected O, but got Unknown + //IL_0350: Unknown result type (might be due to invalid IL or missing references) + //IL_035a: Expected O, but got Unknown + //IL_035c: Unknown result type (might be due to invalid IL or missing references) + //IL_0369: Unknown result type (might be due to invalid IL or missing references) + //IL_0373: Expected O, but got Unknown + //IL_0375: Unknown result type (might be due to invalid IL or missing references) + //IL_0382: Unknown result type (might be due to invalid IL or missing references) + //IL_038c: Expected O, but got Unknown + //IL_038f: Unknown result type (might be due to invalid IL or missing references) + //IL_0399: Expected O, but got Unknown + //IL_03a6: Unknown result type (might be due to invalid IL or missing references) + //IL_03b0: Expected O, but got Unknown + //IL_03be: Unknown result type (might be due to invalid IL or missing references) + //IL_03c8: Expected O, but got Unknown + //IL_03cb: Unknown result type (might be due to invalid IL or missing references) + //IL_03d5: Expected O, but got Unknown + //IL_03e2: Unknown result type (might be due to invalid IL or missing references) + //IL_03ec: Expected O, but got Unknown + //IL_03fa: Unknown result type (might be due to invalid IL or missing references) + //IL_0404: Expected O, but got Unknown + //IL_0407: Unknown result type (might be due to invalid IL or missing references) + //IL_0411: Expected O, but got Unknown + //IL_041e: Unknown result type (might be due to invalid IL or missing references) + //IL_0428: Expected O, but got Unknown + //IL_042a: Unknown result type (might be due to invalid IL or missing references) + //IL_0436: Unknown result type (might be due to invalid IL or missing references) + //IL_0440: Expected O, but got Unknown + //IL_0441: Unknown result type (might be due to invalid IL or missing references) + //IL_044e: Unknown result type (might be due to invalid IL or missing references) + //IL_0458: Expected O, but got Unknown + //IL_045a: 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_0474: Unknown result type (might be due to invalid IL or missing references) + //IL_047e: Expected O, but got Unknown + //IL_0481: Unknown result type (might be due to invalid IL or missing references) + //IL_048b: Expected O, but got Unknown + //IL_048e: Unknown result type (might be due to invalid IL or missing references) + //IL_0498: Expected O, but got Unknown + switch (connectionId) + { + case 1: + IncluirItemButton = (MenuItem)target; + IncluirItemButton.Click += new RoutedEventHandler(Incluir_OnClick); + break; + case 2: + ((MenuItem)target).Click += new RoutedEventHandler(Alterar_OnClick); + break; + case 3: + ((MenuItem)target).Click += new RoutedEventHandler(Salvar_OnClick); + break; + case 4: + ((MenuItem)target).Click += new RoutedEventHandler(Cancelar_OnClick); + break; + case 5: + ((MenuItem)target).Click += new RoutedEventHandler(Excluir_OnClick); + break; + case 6: + ((Control)(TextBox)target).MouseDoubleClick += new MouseButtonEventHandler(CopyCodItem); + break; + case 7: + ((MenuItem)target).Click += new RoutedEventHandler(AbrirAquivoDigital_Click); + break; + case 8: + SinistroButton = (MenuItem)target; + SinistroButton.Click += new RoutedEventHandler(MenuItem_OnClick); + 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(ImportarXls_OnClick); + break; + case 12: + ((MenuItem)target).Click += new RoutedEventHandler(BaixarXls_OnClick); + break; + case 13: + PainelDadosAuto = (WrapPanel)target; + break; + case 14: + FipeBox = (TextBox)target; + ((UIElement)FipeBox).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + ((UIElement)FipeBox).LostFocus += new RoutedEventHandler(Fipe_LostFocus); + break; + case 15: + ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(((BaseUserControl)this).Placa); + ((UIElement)(TextBox)target).PreviewKeyDown += new KeyEventHandler(Placa); + break; + case 16: + AutoCompleteFabricacao = (AutoCompleteBox)target; + AutoCompleteFabricacao.Populating += new PopulatingEventHandler(AutoCompleteFabricanteBox_Populating); + break; + case 17: + ModeloBox = (TextBox)target; + break; + case 18: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(BuscarModelo_OnClick); + break; + case 19: + ((Selector)(ComboBox)target).SelectionChanged += new SelectionChangedEventHandler(SelecionaUsoVeiculo); + break; + case 20: + ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + ((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(Renavam_OnLostFocus); + ((UIElement)(TextBox)target).PreviewKeyUp += new KeyEventHandler(KeyUpBase_OnKeyUp); + break; + case 21: + ((ToggleButton)target).Checked += new RoutedEventHandler(ZeroKmToggleButton_Changed); + ((ToggleButton)target).Unchecked += new RoutedEventHandler(ZeroKmToggleButton_Changed); + break; + case 22: + ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 23: + AnoModeloBox = (TextBox)target; + ((UIElement)AnoModeloBox).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 24: + ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 25: + ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 26: + CepCirculacaoBox = (TextBox)target; + ((UIElement)CepCirculacaoBox).LostFocus += new RoutedEventHandler(Cep_OnLostFocus); + ((UIElement)CepCirculacaoBox).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 27: + CepPernoiteBox = (TextBox)target; + ((UIElement)CepPernoiteBox).LostFocus += new RoutedEventHandler(Cep_OnLostFocus); + ((UIElement)CepPernoiteBox).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 28: + ComboBoxTipoCorrecao = (ComboBox)target; + ((Selector)ComboBoxTipoCorrecao).SelectionChanged += new SelectionChangedEventHandler(ComboBoxTipoCorrecao_SelectionChanged); + break; + case 29: + ((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(Ci_OnLostFocus); + ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 30: + ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); + break; + case 31: + CoberturasRadioButton = (RadioButton)target; + break; + case 32: + MaisInformacoesRadioButton = (RadioButton)target; + break; + case 33: + ContentControl = (ContentControl)target; + break; + case 34: + MaisInformacoes = (CustomItemValidation)target; + break; + default: + _contentLoaded = true; + break; + } + } +} |