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
|
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;
}
}
}
|