summaryrefslogtreecommitdiff
path: root/Gestor.Application/Componentes/DialogExportarPermissao.cs
diff options
context:
space:
mode:
authorLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:38:18 +0000
committerLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:38:18 +0000
commit1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (patch)
treee1c3b20ea08f0cf71122a1e73f0d395f8fd83874 /Gestor.Application/Componentes/DialogExportarPermissao.cs
parent674ca83ba9243a9e95a7568c797668dab6aee26a (diff)
downloadgestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.tar.gz
gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.zip
chore: location
Diffstat (limited to 'Gestor.Application/Componentes/DialogExportarPermissao.cs')
-rw-r--r--Gestor.Application/Componentes/DialogExportarPermissao.cs103
1 files changed, 0 insertions, 103 deletions
diff --git a/Gestor.Application/Componentes/DialogExportarPermissao.cs b/Gestor.Application/Componentes/DialogExportarPermissao.cs
deleted file mode 100644
index aa934dd..0000000
--- a/Gestor.Application/Componentes/DialogExportarPermissao.cs
+++ /dev/null
@@ -1,103 +0,0 @@
-using Gestor.Application.ViewModels.Generic;
-using Gestor.Common.Validation;
-using Gestor.Model.Domain.Seguros;
-using System;
-using System.CodeDom.Compiler;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Runtime.CompilerServices;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Markup;
-
-namespace Gestor.Application.Componentes
-{
- public class DialogExportarPermissao : UserControl, IComponentConnector, IStyleConnector
- {
- public DialogExportarPermissaoViewModel ViewModel;
-
- internal DataGrid UsuarioGrid;
-
- private bool _contentLoaded;
-
- public DialogExportarPermissao(DialogExportarPermissaoViewModel viewModel)
- {
- this.ViewModel = viewModel;
- base.DataContext = this.ViewModel;
- this.InitializeComponent();
- }
-
- private void AutoCompleteBox_OnTextChanged(object sender, RoutedEventArgs e)
- {
- if (!string.IsNullOrWhiteSpace(((AutoCompleteBox)sender).get_Text()))
- {
- return;
- }
- this.ViewModel.FiltrarUsuario("");
- }
-
- private void AutoCompleteBoxUsuario_Populating(object sender, PopulatingEventArgs e)
- {
- e.set_Cancel(true);
- this.ViewModel.Filtrar(ValidationHelper.RemoveDiacritics(e.get_Parameter().Trim())).ContinueWith((Task<List<Usuario>> searchResult) => {
- if (searchResult.Result == null)
- {
- return;
- }
- AutoCompleteBox autoCompleteBox = (AutoCompleteBox)sender;
- autoCompleteBox.set_ItemsSource(searchResult.Result);
- autoCompleteBox.PopulateComplete();
- }, TaskScheduler.FromCurrentSynchronizationContext());
- }
-
- private void CheckBox_Checked(object sender, RoutedEventArgs e)
- {
- this.ViewModel.Selecionar();
- }
-
- [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/componentes/dialogexportarpermissao.xaml", UriKind.Relative));
- }
-
- [DebuggerNonUserCode]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
- void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
- {
- if (connectionId != 1)
- {
- if (connectionId != 2)
- {
- this._contentLoaded = true;
- return;
- }
- this.UsuarioGrid = (DataGrid)target;
- return;
- }
- ((AutoCompleteBox)target).add_Populating(new PopulatingEventHandler(this, DialogExportarPermissao.AutoCompleteBoxUsuario_Populating));
- ((AutoCompleteBox)target).add_TextChanged(new RoutedEventHandler(this.AutoCompleteBox_OnTextChanged));
- }
-
- [DebuggerNonUserCode]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
- void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target)
- {
- if (connectionId == 3)
- {
- ((CheckBox)target).Checked += new RoutedEventHandler(this.CheckBox_Checked);
- ((CheckBox)target).Unchecked += new RoutedEventHandler(this.CheckBox_Checked);
- }
- }
- }
-} \ No newline at end of file