summaryrefslogtreecommitdiff
path: root/Decompiler/Gestor.Application.Views.Ferramentas/SeguradoraView.cs
blob: 34e7151c8f1818ec5447bdec62525ea09bcb0d8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading.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.Drawers;
using Gestor.Application.Helpers;
using Gestor.Application.Servicos;
using Gestor.Application.ViewModels.Ferramentas;
using Gestor.Application.Views.Generic;
using Gestor.Common.Helpers;
using Gestor.Common.Validation;
using Gestor.Model.Common;
using Gestor.Model.Domain.Configuracoes;
using Gestor.Model.Domain.Generic;
using Gestor.Model.Domain.Seguros;
using Xceed.Wpf.AvalonDock.Controls;

namespace Gestor.Application.Views.Ferramentas;

public class SeguradoraView : BaseUserControl, IComponentConnector, IStyleConnector
{
	[Serializable]
	[CompilerGenerated]
	private sealed class _003C_003Ec
	{
		public static readonly _003C_003Ec _003C_003E9 = new _003C_003Ec();

		public static MouseButtonEventHandler _003C_003E9__2_0;

		public static Func<ConfiguracaoSistema, bool> _003C_003E9__21_0;

		internal void _003CContentLoad_003Eb__2_0(object sender, MouseButtonEventArgs args)
		{
		}

		internal bool _003CImpostos_OnClick_003Eb__21_0(ConfiguracaoSistema x)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Invalid comparison between Unknown and I4
			return (int)x.Configuracao != 5;
		}
	}

	public SeguradoraViewModel ViewModel;

	internal DataGrid SeguradoraGrid;

	internal DataGridTextColumn NomeField;

	internal DataGridTextColumn ApelidoField;

	internal MenuItem MaisOpcoesButton;

	internal ToggleButton AtivoBox;

	internal TextBox DocumentoPrincipalBox;

	internal TextBox AssistenciaBox;

	internal TextBox SusepBox;

	internal TextBox CodigoCiaBox;

	internal TextBox LinkAppAndroidBox;

	internal TextBox LinkAppIosBox;

	internal CurrencyTextBox ToleranciaComissaoBox;

	internal CurrencyTextBox ToleranciaPremioBox;

	internal TextBox ObservacaoBox;

	internal ListBox ContatosListBox;

	internal ListBox EnderecoSeguradoraBox;

	private bool _contentLoaded;

	public SeguradoraView()
	{
		((FrameworkElement)this).Tag = "CADASTRO DE SEGURADORA";
		Tela = (TipoTela)13;
		ViewModel = new SeguradoraViewModel();
		((FrameworkElement)this).DataContext = ViewModel;
		InitializeComponent();
		Dispatcher dispatcher = ((DispatcherObject)this).Dispatcher;
		if (dispatcher != null)
		{
			dispatcher.BeginInvoke((DispatcherPriority)7, (Delegate)new Action(ContentLoad));
		}
	}

	private void ContentLoad()
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Expected O, but got Unknown
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Expected O, but got Unknown
		((Selector)SeguradoraGrid).SelectedIndex = 0;
		((Selector)SeguradoraGrid).SelectionChanged += new SelectionChangedEventHandler(SeguradoraGrid_OnSelectionChanged);
		DataGrid seguradoraGrid = SeguradoraGrid;
		object obj = _003C_003Ec._003C_003E9__2_0;
		if (obj == null)
		{
			MouseButtonEventHandler val = delegate
			{
			};
			_003C_003Ec._003C_003E9__2_0 = val;
			obj = (object)val;
		}
		((Control)seguradoraGrid).MouseDoubleClick += (MouseButtonEventHandler)obj;
		((DataGridColumn)NomeField).Visibility = (Visibility)(ViewModel.Apelido ? 2 : 0);
		((DataGridColumn)ApelidoField).Visibility = (Visibility)((!ViewModel.Apelido) ? 2 : 0);
	}

	private async void Salvar_OnClick(object sender, RoutedEventArgs e)
	{
		ViewModel.Loading(isLoading: true);
		ViewModel.SelectedSeguradora.NomeSocial = ViewModel.SelectedSeguradora.NomeSocialBanco.Trim();
		if ((ToleranciaComissaoBox.Number > 2m || ToleranciaPremioBox.Number > 2m) && (ViewModel.Tolerancia != ToleranciaComissaoBox.Number || ViewModel.Tolerancia != ToleranciaPremioBox.Number))
		{
			bool? flag = await ViewModel.ShowSenha("TOLERÂNCIA DE COMISSÃO, DIFERENÇA IMPORTAÇÃO OU REPASSE MAIOR QUE R$2,00, PREENCHA A SENHA ADM PARA PROSSEGUIR.");
			if (!flag.HasValue)
			{
				ViewModel.Loading(isLoading: false);
				return;
			}
			if (!flag.GetValueOrDefault())
			{
				await ViewModel.ShowMessage("SENHA INVÁLIDA");
				ViewModel.Loading(isLoading: false);
				return;
			}
		}
		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)
		{
			await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK");
		}
	}

	private void Alterar_OnClick(object sender, RoutedEventArgs e)
	{
		ViewModel.Clonar();
		ViewModel.Alterar(alterar: true);
		ValidarTela();
	}

	private void Cancelar_OnClick(object sender, RoutedEventArgs e)
	{
		ViewModel.CancelarAlteracao();
	}

	private void IncluirTelefone_OnClick(object sender, RoutedEventArgs e)
	{
		ViewModel.IncluirTelefone();
		ValidarTela();
	}

	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);
			SeguradoraContato contato = (SeguradoraContato)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
			ViewModel.ExcluirTelefone(contato);
		}
	}

	private void ExcluirEndereco_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);
			SeguradoraEndereco endereco = (SeguradoraEndereco)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
			ViewModel.ExcluirEndereco(endereco);
		}
	}

	private void IncluirEndereco_OnClick(object sender, RoutedEventArgs e)
	{
		ViewModel.IncluirEndereco();
		ValidarTela();
	}

	public async void Metas_Click(object sender, RoutedEventArgs e)
	{
		ViewModel.Loading(isLoading: true);
		if (await ViewModel.VerificarPermissao((TipoTela)31))
		{
			ViewModel.ShowDrawer(new MetaSeguradoraView(ViewModel.SelectedSeguradora), 0, close: false);
			ViewModel.Loading(isLoading: false);
		}
	}

	private async void PostcodeBox_OnLostFocus(object sender, RoutedEventArgs e)
	{
		TextBox val = (TextBox)sender;
		string text = ValidationHelper.FormatPostCode(val.Text);
		if (ValidationHelper.ValidatePostCode(text))
		{
			ListBox val2 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val);
			ListBoxItem val3 = (ListBoxItem)((ItemsControl)val2).ItemContainerGenerator.ContainerFromIndex(((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext));
			ContentPresenter contentPresenter = FindVisualChild.Find<ContentPresenter>((DependencyObject)(object)val3);
			DataTemplate dataTemplate = contentPresenter.ContentTemplate;
			((TextBox)((FrameworkTemplate)dataTemplate).FindName("CepBox", (FrameworkElement)(object)contentPresenter)).Text = text;
			EnderecoBase val4 = await ViewModel.BuscaCep(text);
			if (val4 != null)
			{
				TextBox val5 = (TextBox)((FrameworkTemplate)dataTemplate).FindName("EnderecoBox", (FrameworkElement)(object)contentPresenter);
				TextBox val6 = (TextBox)((FrameworkTemplate)dataTemplate).FindName("CidadeBox", (FrameworkElement)(object)contentPresenter);
				TextBox val7 = (TextBox)((FrameworkTemplate)dataTemplate).FindName("EstadoBox", (FrameworkElement)(object)contentPresenter);
				TextBox val8 = (TextBox)((FrameworkTemplate)dataTemplate).FindName("BairroBox", (FrameworkElement)(object)contentPresenter);
				val5.Text = val4.Endereco;
				val6.Text = val4.Cidade;
				val7.Text = val4.Estado;
				val8.Text = val4.Bairro;
			}
		}
	}

	private void AutoCompleteBoxSeguradora_Populating(object sender, PopulatingEventArgs e)
	{
		e.Cancel = true;
		ViewModel.Filtrar(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate(Task<List<Seguradora>> searchResult)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			if (searchResult.Result != null)
			{
				AutoCompleteBox val = (AutoCompleteBox)sender;
				val.ItemsSource = searchResult.Result;
				val.PopulateComplete();
			}
		}, TaskScheduler.FromCurrentSynchronizationContext());
	}

	private void AutoCompleteBox_OnTextChanged(object sender, RoutedEventArgs e)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		if (string.IsNullOrWhiteSpace(((AutoCompleteBox)sender).Text))
		{
			ViewModel.FiltrarSeguradora("");
		}
	}

	private void AutoCompleteBoxDescricao_Populating(object sender, PopulatingEventArgs e)
	{
		e.Cancel = true;
		ViewModel.FiltrarConfig(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate(Task<List<ConfigExtratoImport>> 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 AutoCompleteBoxDescricao_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.FiltrarDescricao("");
		}
	}

	private void SeguradoraGrid_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.SelecionaSeguradora((Seguradora)((val != null) ? ((ItemsControl)val).Items[((Selector)val).SelectedIndex] : null));
		}
	}

	private async void AbrirAquivoDigital_Click(object sender, RoutedEventArgs e)
	{
		if (!new PermissaoArquivoDigitalServico().BuscarPermissao(Recursos.Usuario, (TipoArquivoDigital)8).Consultar)
		{
			await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ACESSAR\nARQUIVO DIGITAL DE " + EnumHelper.GetDescription<TipoArquivoDigital>((TipoArquivoDigital)8) + ".");
			return;
		}
		FiltroArquivoDigital filtro = new FiltroArquivoDigital
		{
			Id = ((DomainBase)ViewModel.SelectedSeguradora).Id,
			Tipo = (TipoArquivoDigital)8,
			Parente = ViewModel.SelectedSeguradora
		};
		ViewModel.ShowDrawer(new ArquivoDigitalDrawer(filtro), 0, close: false);
	}

	private void AbrirLog_OnClick(object sender, RoutedEventArgs e)
	{
		ViewModel.AbrirLog((TipoTela)13, ((DomainBase)ViewModel.SelectedSeguradora).Id);
	}

	private void Incluir_OnClick(object sender, RoutedEventArgs e)
	{
		IncluirSeguradoraView incluirSeguradoraView = new IncluirSeguradoraView(ViewModel.Seguradoras);
		((Window)new HosterWindow((ContentControl)(object)incluirSeguradoraView, "INCLUIR SEGURADORA", 500.0, 600.0)).ShowDialog();
		if (incluirSeguradoraView.ViewModel.AdicionarSeguradora != null)
		{
			ViewModel.Incluir(incluirSeguradoraView.ViewModel.AdicionarSeguradora);
		}
	}

	private void AbrirLogEmail_OnClick(object sender, RoutedEventArgs e)
	{
		ViewModel.AbrirLogEmail((TipoTela)13, ((DomainBase)ViewModel.SelectedSeguradora).Id);
	}

	private async void Impostos_OnClick(object sender, RoutedEventArgs e)
	{
		if (Recursos.Configuracoes.All((ConfiguracaoSistema x) => (int)x.Configuracao != 5))
		{
			await ViewModel.ShowMessage("RECURSO NÃO HABILITADO, ACESSE AS CONFIGURAÇÕES DENTRO DO CADASTRO DE EMPRESAS E FILIAIS PARA HABILITAR O RECURSO.");
		}
		else if (await ViewModel.VerificarPermissao((TipoTela)56))
		{
			ViewModel.ShowDrawer(new ImpostoDrawer(0, ((DomainBase)ViewModel.SelectedSeguradora).Id), 0, close: false);
		}
	}

	private void DocumentoPrincipalBox_LostFocus(object sender, RoutedEventArgs e)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		if (!((TextBoxBase)(TextBox)sender).IsReadOnly)
		{
			string text = ValidationHelper.Clear(DocumentoPrincipalBox.Text);
			if (!string.IsNullOrEmpty(text))
			{
				DocumentoPrincipalBox.Text = ((text.Length == 11) ? ValidationHelper.FormatDocument(text.PadLeft(11, '0').Substring(0, 11)) : ValidationHelper.FormatDocument(text.PadLeft(14, '0').Substring(0, 14)));
			}
		}
	}

	private void ValidarTela()
	{
		if (ViewModel.SelectedSeguradora != null)
		{
			List<KeyValuePair<string, string>> list = ViewModel.SelectedSeguradora.Validate();
			SeguradoraContato? obj = ViewModel.Contatos.FirstOrDefault();
			list.AddRange(((obj != null) ? obj.Validate() : null) ?? new List<KeyValuePair<string, string>>());
			SeguradoraEndereco? obj2 = ViewModel.Enderecos.FirstOrDefault();
			list.AddRange(((obj2 != null) ? obj2.Validate() : null) ?? new List<KeyValuePair<string, string>>());
			((DependencyObject)(object)this).ValidateFields(list, focusField: false);
		}
	}

	public void Selector_ContactChanged(object sender, SelectionChangedEventArgs e)
	{
		ViewModel.TipoTelefoneVisibility = (Visibility)0;
		ViewModel.TelefoneVisibility = (Visibility)0;
		ViewModel.PrefixoVisibility = (Visibility)0;
	}

	[DebuggerNonUserCode]
	[GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
	public void InitializeComponent()
	{
		if (!_contentLoaded)
		{
			_contentLoaded = true;
			Uri uri = new Uri("/Gestor.Application;component/views/ferramentas/seguradoraview.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_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b8: Expected O, but got Unknown
		//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cf: Expected O, but got Unknown
		//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: Expected O, but got Unknown
		//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fe: Expected O, but got Unknown
		//IL_0101: Unknown result type (might be due to invalid IL or missing references)
		//IL_010b: Expected O, but got Unknown
		//IL_010e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0118: Expected O, but got Unknown
		//IL_011b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0125: Expected O, but got Unknown
		//IL_0127: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_013d: Expected O, but got Unknown
		//IL_013f: Unknown result type (might be due to invalid IL or missing references)
		//IL_014b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0155: Expected O, but got Unknown
		//IL_0157: Unknown result type (might be due to invalid IL or missing references)
		//IL_0163: Unknown result type (might be due to invalid IL or missing references)
		//IL_016d: Expected O, but got Unknown
		//IL_016f: Unknown result type (might be due to invalid IL or missing references)
		//IL_017b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0185: Expected O, but got Unknown
		//IL_0187: Unknown result type (might be due to invalid IL or missing references)
		//IL_0193: Unknown result type (might be due to invalid IL or missing references)
		//IL_019d: Expected O, but got Unknown
		//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01aa: Expected O, but got Unknown
		//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c2: Expected O, but got Unknown
		//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01da: Expected O, but got Unknown
		//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f2: Expected O, but got Unknown
		//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_0200: Unknown result type (might be due to invalid IL or missing references)
		//IL_020a: Expected O, but got Unknown
		//IL_020d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0217: Expected O, but got Unknown
		//IL_021a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0224: Expected O, but got Unknown
		//IL_0232: Unknown result type (might be due to invalid IL or missing references)
		//IL_023c: Expected O, but got Unknown
		//IL_0249: Unknown result type (might be due to invalid IL or missing references)
		//IL_0253: Expected O, but got Unknown
		//IL_0256: Unknown result type (might be due to invalid IL or missing references)
		//IL_0260: Expected O, but got Unknown
		//IL_0263: Unknown result type (might be due to invalid IL or missing references)
		//IL_026d: Expected O, but got Unknown
		//IL_0270: Unknown result type (might be due to invalid IL or missing references)
		//IL_027a: Expected O, but got Unknown
		//IL_027d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0287: Expected O, but got Unknown
		//IL_028a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0294: Expected O, but got Unknown
		//IL_0297: Unknown result type (might be due to invalid IL or missing references)
		//IL_02a1: Expected O, but got Unknown
		//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ae: Expected O, but got Unknown
		//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_02bb: Expected O, but got Unknown
		//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d3: Expected O, but got Unknown
		//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e0: Expected O, but got Unknown
		//IL_02e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f8: Expected O, but got Unknown
		//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0305: Expected O, but got Unknown
		//IL_0307: Unknown result type (might be due to invalid IL or missing references)
		//IL_0313: Unknown result type (might be due to invalid IL or missing references)
		//IL_031d: Expected O, but got Unknown
		//IL_031e: Unknown result type (might be due to invalid IL or missing references)
		//IL_032a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0334: Expected O, but got Unknown
		switch (connectionId)
		{
		case 1:
			((AutoCompleteBox)target).Populating += new PopulatingEventHandler(AutoCompleteBoxSeguradora_Populating);
			((AutoCompleteBox)target).TextChanged += new RoutedEventHandler(AutoCompleteBox_OnTextChanged);
			break;
		case 2:
			((AutoCompleteBox)target).Populating += new PopulatingEventHandler(AutoCompleteBoxSeguradora_Populating);
			((AutoCompleteBox)target).TextChanged += new RoutedEventHandler(AutoCompleteBox_OnTextChanged);
			break;
		case 3:
			SeguradoraGrid = (DataGrid)target;
			break;
		case 4:
			NomeField = (DataGridTextColumn)target;
			break;
		case 5:
			ApelidoField = (DataGridTextColumn)target;
			break;
		case 6:
			((MenuItem)target).Click += new RoutedEventHandler(Incluir_OnClick);
			break;
		case 7:
			((MenuItem)target).Click += new RoutedEventHandler(Alterar_OnClick);
			break;
		case 8:
			((MenuItem)target).Click += new RoutedEventHandler(Salvar_OnClick);
			break;
		case 9:
			((MenuItem)target).Click += new RoutedEventHandler(Cancelar_OnClick);
			break;
		case 10:
			((MenuItem)target).Click += new RoutedEventHandler(AbrirAquivoDigital_Click);
			break;
		case 11:
			MaisOpcoesButton = (MenuItem)target;
			break;
		case 12:
			((MenuItem)target).Click += new RoutedEventHandler(Metas_Click);
			break;
		case 13:
			((MenuItem)target).Click += new RoutedEventHandler(Impostos_OnClick);
			break;
		case 14:
			((MenuItem)target).Click += new RoutedEventHandler(AbrirLog_OnClick);
			break;
		case 15:
			((MenuItem)target).Click += new RoutedEventHandler(AbrirLogEmail_OnClick);
			break;
		case 16:
			AtivoBox = (ToggleButton)target;
			break;
		case 17:
			DocumentoPrincipalBox = (TextBox)target;
			((UIElement)DocumentoPrincipalBox).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
			((UIElement)DocumentoPrincipalBox).LostFocus += new RoutedEventHandler(DocumentoPrincipalBox_LostFocus);
			break;
		case 18:
			AssistenciaBox = (TextBox)target;
			break;
		case 19:
			SusepBox = (TextBox)target;
			break;
		case 20:
			CodigoCiaBox = (TextBox)target;
			break;
		case 21:
			LinkAppAndroidBox = (TextBox)target;
			break;
		case 22:
			LinkAppIosBox = (TextBox)target;
			break;
		case 23:
			ToleranciaComissaoBox = (CurrencyTextBox)target;
			break;
		case 24:
			ToleranciaPremioBox = (CurrencyTextBox)target;
			break;
		case 25:
			ObservacaoBox = (TextBox)target;
			break;
		case 26:
			((MenuItem)target).Click += new RoutedEventHandler(IncluirTelefone_OnClick);
			break;
		case 27:
			ContatosListBox = (ListBox)target;
			break;
		case 32:
			((MenuItem)target).Click += new RoutedEventHandler(IncluirEndereco_OnClick);
			break;
		case 33:
			EnderecoSeguradoraBox = (ListBox)target;
			break;
		case 37:
			((AutoCompleteBox)target).Populating += new PopulatingEventHandler(AutoCompleteBoxDescricao_Populating);
			((AutoCompleteBox)target).TextChanged += new RoutedEventHandler(AutoCompleteBoxDescricao_OnTextChanged);
			break;
		default:
			_contentLoaded = true;
			break;
		}
	}

	[DebuggerNonUserCode]
	[GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
	[EditorBrowsable(EditorBrowsableState.Never)]
	void IStyleConnector.Connect(int connectionId, object target)
	{
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Expected O, but got Unknown
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Expected O, but got Unknown
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Expected O, but got Unknown
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		//IL_0085: Unknown result type (might be due to invalid IL or missing references)
		//IL_008f: Expected O, but got Unknown
		//IL_0091: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a7: Expected O, but got Unknown
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bf: Expected O, but got Unknown
		//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d7: Expected O, but got Unknown
		//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f0: Expected O, but got Unknown
		//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0108: Expected O, but got Unknown
		switch (connectionId)
		{
		case 28:
			((Selector)(ComboBox)target).SelectionChanged += new SelectionChangedEventHandler(Selector_ContactChanged);
			break;
		case 29:
			((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
			break;
		case 30:
			((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(FormatarTelefone);
			((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
			break;
		case 31:
			((ButtonBase)(Button)target).Click += new RoutedEventHandler(ExcluirTelefone_OnClick);
			break;
		case 34:
			((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(PostcodeBox_OnLostFocus);
			((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
			break;
		case 35:
			((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
			break;
		case 36:
			((ButtonBase)(Button)target).Click += new RoutedEventHandler(ExcluirEndereco_OnClick);
			break;
		case 32:
		case 33:
			break;
		}
	}
}