summaryrefslogtreecommitdiff
path: root/Gestor.Application/Views/Ajuda
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/Views/Ajuda
parent674ca83ba9243a9e95a7568c797668dab6aee26a (diff)
downloadgestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.tar.gz
gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.zip
chore: location
Diffstat (limited to 'Gestor.Application/Views/Ajuda')
-rw-r--r--Gestor.Application/Views/Ajuda/AtendimentosView.cs302
1 files changed, 0 insertions, 302 deletions
diff --git a/Gestor.Application/Views/Ajuda/AtendimentosView.cs b/Gestor.Application/Views/Ajuda/AtendimentosView.cs
deleted file mode 100644
index 9cf46c0..0000000
--- a/Gestor.Application/Views/Ajuda/AtendimentosView.cs
+++ /dev/null
@@ -1,302 +0,0 @@
-using Gestor.Application.Componentes;
-using Gestor.Application.Helpers;
-using Gestor.Application.ViewModels.Drawer.Ajuda;
-using Gestor.Application.ViewModels.Generic;
-using Gestor.Application.Views.Ferramentas;
-using Gestor.Application.Views.Generic;
-using Gestor.Model.API;
-using Gestor.Model.Domain.Common;
-using Gestor.Model.Domain.Seguros;
-using MaterialDesignThemes.Wpf;
-using mshtml;
-using System;
-using System.CodeDom.Compiler;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Input;
-using System.Windows.Markup;
-using Xceed.Wpf.AvalonDock.Controls;
-
-namespace Gestor.Application.Views.Ajuda
-{
- public class AtendimentosView : BaseUserControl, IComponentConnector, IStyleConnector
- {
- internal AtendimentosViewModel ViewModel;
-
- internal ComboBox StatusCbo;
-
- internal DataGrid AtendimentosGrid;
-
- internal DataGridTextColumn SolucaoColumn;
-
- internal TextBox NomeBox;
-
- internal TextBox Ddd;
-
- internal TextBox TelefoneBox;
-
- internal TextBox ValorBox;
-
- internal TextBox AssuntoBox;
-
- internal TextBox IdAcessoBox;
-
- internal TextBox SenhaBox;
-
- internal Gestor.Application.Componentes.WebEditor WebEditor;
-
- private bool _contentLoaded;
-
- [DebuggerNonUserCode]
- [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
- internal Delegate _CreateDelegate(Type delegateType, string handler)
- {
- return Delegate.CreateDelegate(delegateType, this, handler);
- }
-
- public AtendimentosView()
- {
- this.ViewModel = new AtendimentosViewModel();
- base.DataContext = this.ViewModel;
- this.InitializeComponent();
- this.ViewModel.Head = string.Concat(Recursos.Usuario.get_Nome(), " - ", Recursos.Empresa.get_Nome(), ", VOCÊ ESTÁ EM ATENDIMENTOS");
- this.StatusCbo.SelectedIndex = 0;
- this.ViewModel.IsVisible = System.Windows.Visibility.Visible;
- }
-
- private void AbrirAntendimento_OnClick(object sender, RoutedEventArgs e)
- {
- this.AtendimentosGrid.SelectedItem = null;
- this.ViewModel.LimparComponentes();
- if (this.WebEditor.WebBrowserEditor.HtmlDocument.body != null)
- {
- this.WebEditor.WebBrowserEditor.HtmlDocument.body.innerHTML = string.Empty;
- }
- this.ViewModel.AtendimentoVisibility = System.Windows.Visibility.Collapsed;
- this.ViewModel.EnvioEmailVisibility = System.Windows.Visibility.Visible;
- this.ViewModel.IsEnabled = false;
- }
-
- private void AcessoRemoto_OnClick(object sender, RoutedEventArgs e)
- {
- string str = "c:\\AggerSeguros\\Remoto.exe";
- if (File.Exists(str))
- {
- Process.Start(str);
- return;
- }
- Parameters parameter = new Parameters();
- parameter.set_Beta(false);
- parameter.set_Type(99);
- parameter.set_Application("Remoto.exe");
- parameter.set_Directory("");
- parameter.set_Run(true);
- (new DownloadWindow(parameter)).Show();
- }
-
- private void AnexarArquivos_OnClick(object sender, RoutedEventArgs e)
- {
- this.ViewModel.Anexar();
- }
-
- private void Cancelar_OnClick(object sender, RoutedEventArgs e)
- {
- this.ViewModel.IsEnabled = true;
- this.ViewModel.SelecionaAtendimento();
- }
-
- private void DeleteArquivo_OnDeleteClick(object sender, RoutedEventArgs e)
- {
- Chip chip = sender as Chip;
- if (chip == null)
- {
- return;
- }
- ListBox listBox = Extentions.FindVisualAncestor<ListBox>(chip);
- Gestor.Model.Domain.Common.ArquivoDigital item = (Gestor.Model.Domain.Common.ArquivoDigital)listBox.Items[listBox.Items.IndexOf(chip.DataContext)];
- if (item == null)
- {
- return;
- }
- this.ViewModel.Delete(item);
- }
-
- private async void Enviar_OnClick(object sender, RoutedEventArgs e)
- {
- bool flag;
- this.ViewModel.Loading(true);
- this.ViewModel.Corpo = this.WebEditor.GetHtml();
- List<KeyValuePair<string, string>> keyValuePairs = await this.ViewModel.Enviar();
- flag = (keyValuePairs == null ? true : keyValuePairs.Count == 0);
- if (keyValuePairs != null)
- {
- List<KeyValuePair<string, string>> keyValuePairs1 = keyValuePairs;
- if (keyValuePairs1.Any<KeyValuePair<string, string>>((KeyValuePair<string, string> x) => x.Key == "fail"))
- {
- List<KeyValuePair<string, string>> keyValuePairs2 = keyValuePairs;
- List<KeyValuePair<string, string>> keyValuePairs3 = keyValuePairs;
- keyValuePairs2.Remove(keyValuePairs3.First<KeyValuePair<string, string>>((KeyValuePair<string, string> x) => x.Key == "fail"));
- }
- }
- this.ValidateFields(keyValuePairs, true);
- this.ViewModel.Loading(false);
- if (flag)
- {
- await this.ViewModel.ShowMessage("SOLICITAÇÃO ENVIADA PARA AGGER, POR FAVOR AGUARDE NOSSO RETORNO!", "OK", "", false);
- this.WebEditor.Body = "";
- }
- else
- {
- await this.ViewModel.ShowMessage(keyValuePairs, this.ViewModel.ErroCamposInvalidos, "OK", "");
- }
- }
-
- [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/ajuda/atendimentosview.xaml", UriKind.Relative));
- }
-
- private void SelectedStatus_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
- {
- if (this.StatusCbo.SelectedItem == null)
- {
- return;
- }
- this.ViewModel.WorkOnSelectedStatus(this.StatusCbo.SelectedItem.ToString());
- this.SolucaoColumn.Visibility = (this.StatusCbo.SelectedItem.ToString() == "PENDENTES" ? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible);
- }
-
- [DebuggerNonUserCode]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
- void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
- {
- switch (connectionId)
- {
- case 1:
- {
- this.StatusCbo = (ComboBox)target;
- this.StatusCbo.SelectionChanged += new SelectionChangedEventHandler(this.SelectedStatus_OnSelectionChanged);
- return;
- }
- case 2:
- {
- ((Button)target).Click += new RoutedEventHandler(this.AbrirAntendimento_OnClick);
- return;
- }
- case 3:
- {
- this.AtendimentosGrid = (DataGrid)target;
- return;
- }
- case 4:
- {
- this.SolucaoColumn = (DataGridTextColumn)target;
- return;
- }
- case 5:
- {
- ((Button)target).Click += new RoutedEventHandler(this.Cancelar_OnClick);
- return;
- }
- case 6:
- {
- ((Button)target).Click += new RoutedEventHandler(this.AnexarArquivos_OnClick);
- return;
- }
- case 7:
- {
- ((Button)target).Click += new RoutedEventHandler(this.Enviar_OnClick);
- return;
- }
- case 8:
- {
- this.NomeBox = (TextBox)target;
- return;
- }
- case 9:
- {
- this.Ddd = (TextBox)target;
- AtendimentosView atendimentosView = this;
- this.Ddd.PreviewTextInput += new TextCompositionEventHandler(atendimentosView.SomenteNumeros);
- return;
- }
- case 10:
- {
- this.TelefoneBox = (TextBox)target;
- AtendimentosView atendimentosView1 = this;
- this.TelefoneBox.LostFocus += new RoutedEventHandler(atendimentosView1.FormatarTelefone);
- AtendimentosView atendimentosView2 = this;
- this.TelefoneBox.PreviewTextInput += new TextCompositionEventHandler(atendimentosView2.SomenteNumeros);
- return;
- }
- case 11:
- {
- this.ValorBox = (TextBox)target;
- return;
- }
- case 12:
- {
- this.AssuntoBox = (TextBox)target;
- return;
- }
- case 13:
- {
- this.IdAcessoBox = (TextBox)target;
- return;
- }
- case 14:
- {
- this.SenhaBox = (TextBox)target;
- return;
- }
- case 15:
- {
- ((Button)target).Click += new RoutedEventHandler(this.AcessoRemoto_OnClick);
- return;
- }
- case 16:
- {
- this._contentLoaded = true;
- return;
- }
- case 17:
- {
- this.WebEditor = (Gestor.Application.Componentes.WebEditor)target;
- return;
- }
- default:
- {
- this._contentLoaded = true;
- return;
- }
- }
- }
-
- [DebuggerNonUserCode]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
- void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target)
- {
- if (connectionId == 16)
- {
- ((Chip)target).add_DeleteClick(new RoutedEventHandler(this.DeleteArquivo_OnDeleteClick));
- }
- }
- }
-} \ No newline at end of file