From 225aa1499e37faf9d38257caabbadc68d78b427e Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 12:29:41 -0300 Subject: decompiler.com --- .../IncluirSeguradoraView.cs | 137 +++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 Decompiler/Gestor.Application.Views.Ferramentas/IncluirSeguradoraView.cs (limited to 'Decompiler/Gestor.Application.Views.Ferramentas/IncluirSeguradoraView.cs') diff --git a/Decompiler/Gestor.Application.Views.Ferramentas/IncluirSeguradoraView.cs b/Decompiler/Gestor.Application.Views.Ferramentas/IncluirSeguradoraView.cs new file mode 100644 index 0000000..90c0bd8 --- /dev/null +++ b/Decompiler/Gestor.Application.Views.Ferramentas/IncluirSeguradoraView.cs @@ -0,0 +1,137 @@ +using System; +using System.CodeDom.Compiler; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +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.ViewModels.Ferramentas; +using Gestor.Application.Views.Generic; +using Gestor.Model.Domain.Seguros; + +namespace Gestor.Application.Views.Ferramentas; + +public class IncluirSeguradoraView : BaseUserControl, IComponentConnector +{ + public IncluirSeguradoraViewModel ViewModel; + + internal DataGrid SeguradoraGrid; + + private bool _contentLoaded; + + public IncluirSeguradoraView(List seguradoras) + { + ViewModel = new IncluirSeguradoraViewModel(seguradoras); + ((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 + ((Selector)SeguradoraGrid).SelectionChanged += new SelectionChangedEventHandler(SeguradoraGrid_OnSelectionChanged); + } + + 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.SelectedSeguradora = (Seguradora)((val != null) ? ((ItemsControl)val).Items[((Selector)val).SelectedIndex] : null); + } + } + + private void Pesquisar_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.Pesquisar(); + } + + private void Incluir_OnClick(object sender, RoutedEventArgs e) + { + if (ViewModel.SelectedSeguradora != null) + { + ViewModel.AdicionarSeguradora = ViewModel.SelectedSeguradora; + Gestor.Application.Actions.Actions.CloseHoster?.Invoke(); + } + } + + private void Pesquisar_OnPreviewKeyDown(object sender, KeyEventArgs e) + { + //IL_0001: Unknown result type (might be due to invalid IL or missing references) + //IL_0007: Invalid comparison between Unknown and I4 + if ((int)e.Key == 6) + { + ViewModel.Pesquisar(); + } + } + + [DebuggerNonUserCode] + [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() + { + if (!_contentLoaded) + { + _contentLoaded = true; + Uri uri = new Uri("/Gestor.Application;component/views/ferramentas/incluirseguradoraview.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_001b: Unknown result type (might be due to invalid IL or missing references) + //IL_0027: Unknown result type (might be due to invalid IL or missing references) + //IL_0031: Expected O, but got Unknown + //IL_0033: Unknown result type (might be due to invalid IL or missing references) + //IL_003f: Unknown result type (might be due to invalid IL or missing references) + //IL_0049: Expected O, but got Unknown + //IL_004c: Unknown result type (might be due to invalid IL or missing references) + //IL_0056: Expected O, but got Unknown + //IL_0058: Unknown result type (might be due to invalid IL or missing references) + //IL_0064: Unknown result type (might be due to invalid IL or missing references) + //IL_006e: Expected O, but got Unknown + switch (connectionId) + { + case 1: + ((UIElement)(TextBox)target).PreviewKeyDown += new KeyEventHandler(Pesquisar_OnPreviewKeyDown); + break; + case 2: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Pesquisar_OnClick); + break; + case 3: + SeguradoraGrid = (DataGrid)target; + break; + case 4: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Incluir_OnClick); + break; + default: + _contentLoaded = true; + break; + } + } +} -- cgit v1.2.3