From 225aa1499e37faf9d38257caabbadc68d78b427e Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 12:29:41 -0300 Subject: decompiler.com --- .../DialogAdvertising.cs | 106 +++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 Decompiler/Gestor.Application.Componentes/DialogAdvertising.cs (limited to 'Decompiler/Gestor.Application.Componentes/DialogAdvertising.cs') diff --git a/Decompiler/Gestor.Application.Componentes/DialogAdvertising.cs b/Decompiler/Gestor.Application.Componentes/DialogAdvertising.cs new file mode 100644 index 0000000..4c2f5f8 --- /dev/null +++ b/Decompiler/Gestor.Application.Componentes/DialogAdvertising.cs @@ -0,0 +1,106 @@ +using System; +using System.CodeDom.Compiler; +using System.ComponentModel; +using System.Diagnostics; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Input; +using System.Windows.Markup; +using Gestor.Application.ViewModels.Generic; +using MaterialDesignThemes.Wpf; +using Newtonsoft.Json.Linq; + +namespace Gestor.Application.Componentes; + +public class DialogAdvertising : UserControl, IComponentConnector +{ + private DialogAdvertisingViewModel ViewModel; + + private readonly bool _isPromocao; + + internal Label Titulo; + + private bool _contentLoaded; + + public DialogAdvertising(JObject jsonAd, bool isPromo = true) + { + ViewModel = new DialogAdvertisingViewModel(jsonAd, isPromo); + ((FrameworkElement)this).DataContext = ViewModel; + InitializeComponent(); + } + + private void LinkImage_MouseDown(object sender, MouseButtonEventArgs e) + { + try + { + if (!_isPromocao) + { + ViewModel.EnviarPesquisa(); + } + Process.Start(ViewModel.Url); + } + catch + { + } + } + + private void Lido_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.SalvaEditarArquivoConfig(visto: true); + DialogHost.CloseDialogCommand.Execute((object)null, (IInputElement)null); + } + + private void CloseOnClick(object sender, RoutedEventArgs e) + { + DialogHost.CloseDialogCommand.Execute((object)null, (IInputElement)null); + } + + [DebuggerNonUserCode] + [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() + { + if (!_contentLoaded) + { + _contentLoaded = true; + Uri uri = new Uri("/Gestor.Application;component/componentes/dialogadvertising.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_0028: Unknown result type (might be due to invalid IL or missing references) + //IL_0034: Unknown result type (might be due to invalid IL or missing references) + //IL_003e: Expected O, but got Unknown + //IL_0040: Unknown result type (might be due to invalid IL or missing references) + //IL_004c: Unknown result type (might be due to invalid IL or missing references) + //IL_0056: Expected O, but got Unknown + //IL_0058: Unknown result type (might be due to invalid IL or missing references) + //IL_0064: Unknown result type (might be due to invalid IL or missing references) + //IL_006e: Expected O, but got Unknown + switch (connectionId) + { + case 1: + Titulo = (Label)target; + break; + case 2: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(CloseOnClick); + break; + case 3: + ((UIElement)(Image)target).MouseDown += new MouseButtonEventHandler(LinkImage_MouseDown); + break; + case 4: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Lido_OnClick); + break; + default: + _contentLoaded = true; + break; + } + } +} -- cgit v1.2.3