summaryrefslogtreecommitdiff
path: root/Decompiler/Gestor.Application.Views.Ajuda
diff options
context:
space:
mode:
Diffstat (limited to 'Decompiler/Gestor.Application.Views.Ajuda')
-rw-r--r--Decompiler/Gestor.Application.Views.Ajuda/AtendimentosView.cs299
1 files changed, 299 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.Views.Ajuda/AtendimentosView.cs b/Decompiler/Gestor.Application.Views.Ajuda/AtendimentosView.cs
new file mode 100644
index 0000000..2bf4bd4
--- /dev/null
+++ b/Decompiler/Gestor.Application.Views.Ajuda/AtendimentosView.cs
@@ -0,0 +1,299 @@
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Input;
+using System.Windows.Markup;
+using Gestor.Application.Componentes;
+using Gestor.Application.Helpers;
+using Gestor.Application.ViewModels.Drawer.Ajuda;
+using Gestor.Application.Views.Ferramentas;
+using Gestor.Application.Views.Generic;
+using Gestor.Model.API;
+using Gestor.Model.Domain.Common;
+using MaterialDesignThemes.Wpf;
+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 WebEditor WebEditor;
+
+ private bool _contentLoaded;
+
+ public AtendimentosView()
+ {
+ ViewModel = new AtendimentosViewModel();
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ ViewModel.Head = Recursos.Usuario.Nome + " - " + Recursos.Empresa.Nome + ", VOCÊ ESTÁ EM ATENDIMENTOS";
+ ((Selector)StatusCbo).SelectedIndex = 0;
+ ViewModel.IsVisible = (Visibility)0;
+ }
+
+ private void AnexarArquivos_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Anexar();
+ }
+
+ private async void Enviar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Loading(isLoading: true);
+ ViewModel.Corpo = WebEditor.GetHtml();
+ List<KeyValuePair<string, string>> list = await ViewModel.Enviar();
+ bool num = list == null || list.Count == 0;
+ if (list != null && list.Any((KeyValuePair<string, string> x) => x.Key == "fail"))
+ {
+ list.Remove(list.First((KeyValuePair<string, string> x) => x.Key == "fail"));
+ }
+ ((DependencyObject)(object)this).ValidateFields(list);
+ ViewModel.Loading(isLoading: false);
+ if (!num)
+ {
+ await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK");
+ return;
+ }
+ await ViewModel.ShowMessage("SOLICITAÇÃO ENVIADA PARA AGGER, POR FAVOR AGUARDE NOSSO RETORNO!");
+ WebEditor.Body = "";
+ }
+
+ private void SelectedStatus_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ if (((Selector)StatusCbo).SelectedItem != null)
+ {
+ ViewModel.WorkOnSelectedStatus(((Selector)StatusCbo).SelectedItem.ToString());
+ ((DataGridColumn)SolucaoColumn).Visibility = (Visibility)((((Selector)StatusCbo).SelectedItem.ToString() == "PENDENTES") ? 2 : 0);
+ }
+ }
+
+ private void AbrirAntendimento_OnClick(object sender, RoutedEventArgs e)
+ {
+ ((Selector)AtendimentosGrid).SelectedItem = null;
+ ViewModel.LimparComponentes();
+ if (WebEditor.WebBrowserEditor.HtmlDocument.body != null)
+ {
+ WebEditor.WebBrowserEditor.HtmlDocument.body.innerHTML = string.Empty;
+ }
+ ViewModel.AtendimentoVisibility = (Visibility)2;
+ ViewModel.EnvioEmailVisibility = (Visibility)0;
+ ViewModel.IsEnabled = false;
+ }
+
+ private void Cancelar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.IsEnabled = true;
+ ViewModel.SelecionaAtendimento();
+ }
+
+ private void AcessoRemoto_OnClick(object sender, RoutedEventArgs e)
+ {
+ //IL_0016: Unknown result type (might be due to invalid IL or missing references)
+ //IL_001b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0022: Unknown result type (might be due to invalid IL or missing references)
+ //IL_002a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0035: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0040: Unknown result type (might be due to invalid IL or missing references)
+ //IL_004c: Expected O, but got Unknown
+ string text = "c:\\AggerSeguros\\Remoto.exe";
+ if (File.Exists(text))
+ {
+ Process.Start(text);
+ return;
+ }
+ ((Window)new DownloadWindow(new Parameters
+ {
+ Beta = false,
+ Type = 99,
+ Application = "Remoto.exe",
+ Directory = "",
+ Run = true
+ })).Show();
+ }
+
+ private void DeleteArquivo_OnDeleteClick(object sender, RoutedEventArgs e)
+ {
+ //IL_002e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0034: Expected O, but got Unknown
+ Chip val = (Chip)((sender is Chip) ? sender : null);
+ if (val != null)
+ {
+ ListBox val2 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val);
+ ArquivoDigital val3 = (ArquivoDigital)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ if (val3 != null)
+ {
+ ViewModel.Delete(val3);
+ }
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/views/ajuda/atendimentosview.xaml", UriKind.Relative);
+ Application.LoadComponent((object)this, uri);
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ internal Delegate _CreateDelegate(Type delegateType, string handler)
+ {
+ return Delegate.CreateDelegate(delegateType, this, handler);
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IComponentConnector.Connect(int connectionId, object target)
+ {
+ //IL_0053: Unknown result type (might be due to invalid IL or missing references)
+ //IL_005d: Expected O, but got Unknown
+ //IL_006a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0074: Expected O, but got Unknown
+ //IL_0076: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0082: Unknown result type (might be due to invalid IL or missing references)
+ //IL_008c: Expected O, but got Unknown
+ //IL_008f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0099: Expected O, but got Unknown
+ //IL_009c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a6: Expected O, but got Unknown
+ //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b4: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00be: Expected O, but got Unknown
+ //IL_00c0: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00cc: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00d6: Expected O, but got Unknown
+ //IL_00d8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00e4: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ee: Expected O, but got Unknown
+ //IL_00f1: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00fb: Expected O, but got Unknown
+ //IL_00fe: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0108: Expected O, but got Unknown
+ //IL_0116: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0120: Expected O, but got Unknown
+ //IL_0123: Unknown result type (might be due to invalid IL or missing references)
+ //IL_012d: Expected O, but got Unknown
+ //IL_013b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0145: Expected O, but got Unknown
+ //IL_0153: Unknown result type (might be due to invalid IL or missing references)
+ //IL_015d: Expected O, but got Unknown
+ //IL_0160: Unknown result type (might be due to invalid IL or missing references)
+ //IL_016a: Expected O, but got Unknown
+ //IL_016d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0177: Expected O, but got Unknown
+ //IL_017a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0184: Expected O, but got Unknown
+ //IL_0187: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0191: Expected O, but got Unknown
+ //IL_0193: Unknown result type (might be due to invalid IL or missing references)
+ //IL_019f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01a9: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ StatusCbo = (ComboBox)target;
+ ((Selector)StatusCbo).SelectionChanged += new SelectionChangedEventHandler(SelectedStatus_OnSelectionChanged);
+ break;
+ case 2:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(AbrirAntendimento_OnClick);
+ break;
+ case 3:
+ AtendimentosGrid = (DataGrid)target;
+ break;
+ case 4:
+ SolucaoColumn = (DataGridTextColumn)target;
+ break;
+ case 5:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Cancelar_OnClick);
+ break;
+ case 6:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(AnexarArquivos_OnClick);
+ break;
+ case 7:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Enviar_OnClick);
+ break;
+ case 8:
+ NomeBox = (TextBox)target;
+ break;
+ case 9:
+ Ddd = (TextBox)target;
+ ((UIElement)Ddd).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
+ break;
+ case 10:
+ TelefoneBox = (TextBox)target;
+ ((UIElement)TelefoneBox).LostFocus += new RoutedEventHandler(FormatarTelefone);
+ ((UIElement)TelefoneBox).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
+ break;
+ case 11:
+ ValorBox = (TextBox)target;
+ break;
+ case 12:
+ AssuntoBox = (TextBox)target;
+ break;
+ case 13:
+ IdAcessoBox = (TextBox)target;
+ break;
+ case 14:
+ SenhaBox = (TextBox)target;
+ break;
+ case 15:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(AcessoRemoto_OnClick);
+ break;
+ case 17:
+ WebEditor = (WebEditor)target;
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IStyleConnector.Connect(int connectionId, object target)
+ {
+ //IL_0006: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0012: Unknown result type (might be due to invalid IL or missing references)
+ //IL_001c: Expected O, but got Unknown
+ if (connectionId == 16)
+ {
+ ((Chip)target).DeleteClick += new RoutedEventHandler(DeleteArquivo_OnDeleteClick);
+ }
+ }
+}