summaryrefslogtreecommitdiff
path: root/Gestor.Application/Views/Financeiro/InfoExtratoView.cs
diff options
context:
space:
mode:
authorLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:35:25 +0000
committerLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:35:25 +0000
commit674ca83ba9243a9e95a7568c797668dab6aee26a (patch)
tree4a905b3fb1d827665a34d63f67bc5559f8e7235b /Gestor.Application/Views/Financeiro/InfoExtratoView.cs
downloadgestor-674ca83ba9243a9e95a7568c797668dab6aee26a.tar.gz
gestor-674ca83ba9243a9e95a7568c797668dab6aee26a.zip
feat: upload files
Diffstat (limited to 'Gestor.Application/Views/Financeiro/InfoExtratoView.cs')
-rw-r--r--Gestor.Application/Views/Financeiro/InfoExtratoView.cs127
1 files changed, 127 insertions, 0 deletions
diff --git a/Gestor.Application/Views/Financeiro/InfoExtratoView.cs b/Gestor.Application/Views/Financeiro/InfoExtratoView.cs
new file mode 100644
index 0000000..a666da9
--- /dev/null
+++ b/Gestor.Application/Views/Financeiro/InfoExtratoView.cs
@@ -0,0 +1,127 @@
+using Gestor.Application.ViewModels.Financeiro;
+using Gestor.Application.ViewModels.Generic;
+using Gestor.Application.Views.Generic;
+using Gestor.Model.Domain.Financeiro;
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Shapes;
+
+namespace Gestor.Application.Views.Financeiro
+{
+ public class InfoExtratoView : BaseUserControl, IComponentConnector
+ {
+ private bool _buttonClickable;
+
+ private bool _contentLoaded;
+
+ public InfoExtratoViewModel ViewModel
+ {
+ get;
+ set;
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ internal Delegate _CreateDelegate(Type delegateType, string handler)
+ {
+ return Delegate.CreateDelegate(delegateType, this, handler);
+ }
+
+ public InfoExtratoView(Saldo saldo, bool telaBancos = false)
+ {
+ this.ViewModel = new InfoExtratoViewModel(telaBancos);
+ base.DataContext = this.ViewModel;
+ this.ViewModel.SelectedSaldo = saldo;
+ this.InitializeComponent();
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (this._contentLoaded)
+ {
+ return;
+ }
+ this._contentLoaded = true;
+ System.Windows.Application.LoadComponent(this, new Uri("/Gestor.Application;component/views/financeiro/infoextratoview.xaml", UriKind.Relative));
+ }
+
+ private async void Salvar_OnClick(object sender, RoutedEventArgs e)
+ {
+ bool flag;
+ this.ViewModel.Loading(true);
+ List<KeyValuePair<string, string>> keyValuePairs = await this.ViewModel.Salvar();
+ flag = (keyValuePairs == null ? true : keyValuePairs.Count == 0);
+ this.ViewModel.Loading(false);
+ if (!flag)
+ {
+ await this.ViewModel.ShowMessage(keyValuePairs, this.ViewModel.ErroCamposInvalidos, "OK", "");
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
+ {
+ if (connectionId != 1)
+ {
+ this._contentLoaded = true;
+ return;
+ }
+ ((MenuItem)target).Click += new RoutedEventHandler(this.Salvar_OnClick);
+ }
+
+ private static void TopControls_OnMouseEnter(object sender, MouseEventArgs e)
+ {
+ ((Grid)sender).Background = (((Grid)sender).Name == "CloseButton" ? new SolidColorBrush(Colors.IndianRed) : new SolidColorBrush(Colors.Gray));
+ Path child = VisualTreeHelper.GetChild((Grid)sender, 0) as Path;
+ if (child != null)
+ {
+ child.Stroke = new SolidColorBrush(Colors.White);
+ }
+ }
+
+ private void TopControls_OnMouseLeave(object sender, MouseEventArgs e)
+ {
+ this._buttonClickable = false;
+ ((Grid)sender).Background = new SolidColorBrush(Colors.Transparent);
+ Path child = VisualTreeHelper.GetChild((Grid)sender, 0) as Path;
+ if (child != null)
+ {
+ child.Stroke = new SolidColorBrush(Colors.White);
+ }
+ }
+
+ private void TopControls_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+ {
+ this._buttonClickable = true;
+ ((Grid)sender).Background = (((Grid)sender).Name == "CloseButton" ? new SolidColorBrush(Colors.Red) : new SolidColorBrush(Colors.DimGray));
+ }
+
+ private void TopControls_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
+ {
+ if (this._buttonClickable)
+ {
+ MethodInfo method = base.GetType().GetMethod(string.Concat(((Grid)sender).Name, "_Click"));
+ if (method == null)
+ {
+ return;
+ }
+ method.Invoke(this, null);
+ }
+ }
+ }
+} \ No newline at end of file