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.Componentes/DialogTransferencia.cs | |
| parent | 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (diff) | |
| download | gestor-225aa1499e37faf9d38257caabbadc68d78b427e.tar.gz gestor-225aa1499e37faf9d38257caabbadc68d78b427e.zip | |
decompiler.com
Diffstat (limited to 'Decompiler/Gestor.Application.Componentes/DialogTransferencia.cs')
| -rw-r--r-- | Decompiler/Gestor.Application.Componentes/DialogTransferencia.cs | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.Componentes/DialogTransferencia.cs b/Decompiler/Gestor.Application.Componentes/DialogTransferencia.cs new file mode 100644 index 0000000..f07e81b --- /dev/null +++ b/Decompiler/Gestor.Application.Componentes/DialogTransferencia.cs @@ -0,0 +1,116 @@ +using System; +using System.CodeDom.Compiler; +using System.ComponentModel; +using System.Diagnostics; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Markup; +using Assinador.Infrastructure.Helpers; +using CurrencyTextBoxControl; +using Gestor.Application.ViewModels.Financeiro; +using Gestor.Common.Validation; +using Gestor.Model.Domain.Financeiro; + +namespace Gestor.Application.Componentes; + +public class DialogTransferencia : UserControl, IComponentConnector +{ + internal ComboBox ContaOrigemBox; + + internal CurrencyTextBox ValorBox; + + internal DatePicker VencimentoBox; + + internal ComboBox ContaDestinoBox; + + private bool _contentLoaded; + + private TranferenciaViewModel ViewModel { get; } + + public DialogTransferencia(Transferencia transferencia) + { + ViewModel = new TranferenciaViewModel(transferencia); + ((FrameworkElement)this).DataContext = ViewModel; + InitializeComponent(); + } + + public void DatePicker_OnLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e) + { + //IL_0001: Unknown result type (might be due to invalid IL or missing references) + //IL_0006: Unknown result type (might be due to invalid IL or missing references) + DatePicker val = (DatePicker)sender; + val.Text = ValidationHelper.FormatDate(val.Text); + } + + public void DatePicker_PreviewKeyDown(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 + //IL_000b: Unknown result type (might be due to invalid IL or missing references) + if ((int)e.Key == 6) + { + ((DatePicker)sender).Text = Functions.GetNetworkTime().Date.ToString("dd/MM/yyyy"); + } + } + + private void DataAtual_OnDoubleClick(object sender, RoutedEventArgs e) + { + //IL_0001: Unknown result type (might be due to invalid IL or missing references) + ((DatePicker)sender).SelectedDate = Functions.GetNetworkTime().Date; + } + + [DebuggerNonUserCode] + [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() + { + if (!_contentLoaded) + { + _contentLoaded = true; + Uri uri = new Uri("/Gestor.Application;component/componentes/dialogtransferencia.xaml", UriKind.Relative); + Application.LoadComponent((object)this, uri); + } + } + + [DebuggerNonUserCode] + [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] + [EditorBrowsable(EditorBrowsableState.Never)] + void IComponentConnector.Connect(int connectionId, object target) + { + //IL_001c: Unknown result type (might be due to invalid IL or missing references) + //IL_0026: Expected O, but got Unknown + //IL_0029: Unknown result type (might be due to invalid IL or missing references) + //IL_0033: Expected O, but got Unknown + //IL_0036: Unknown result type (might be due to invalid IL or missing references) + //IL_0040: Expected O, but got Unknown + //IL_004d: Unknown result type (might be due to invalid IL or missing references) + //IL_0057: Expected O, but got Unknown + //IL_0064: Unknown result type (might be due to invalid IL or missing references) + //IL_006e: Expected O, but got Unknown + //IL_007b: Unknown result type (might be due to invalid IL or missing references) + //IL_0085: Expected O, but got Unknown + //IL_0088: Unknown result type (might be due to invalid IL or missing references) + //IL_0092: Expected O, but got Unknown + switch (connectionId) + { + case 1: + ContaOrigemBox = (ComboBox)target; + break; + case 2: + ValorBox = (CurrencyTextBox)target; + break; + case 3: + VencimentoBox = (DatePicker)target; + ((UIElement)VencimentoBox).PreviewKeyDown += new KeyEventHandler(DatePicker_PreviewKeyDown); + ((UIElement)VencimentoBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(DatePicker_OnLostKeyboardFocus); + ((Control)VencimentoBox).MouseDoubleClick += new MouseButtonEventHandler(DataAtual_OnDoubleClick); + break; + case 4: + ContaDestinoBox = (ComboBox)target; + break; + default: + _contentLoaded = true; + break; + } + } +} |