summaryrefslogtreecommitdiff
path: root/Decompiler/Gestor.Application.Componentes/DialogTransferencia.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Decompiler/Gestor.Application.Componentes/DialogTransferencia.cs')
-rw-r--r--Decompiler/Gestor.Application.Componentes/DialogTransferencia.cs116
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;
+ }
+ }
+}