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 --- .../IntToMedalConverter.cs | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Decompiler/Gestor.Application.Converters/IntToMedalConverter.cs (limited to 'Decompiler/Gestor.Application.Converters/IntToMedalConverter.cs') diff --git a/Decompiler/Gestor.Application.Converters/IntToMedalConverter.cs b/Decompiler/Gestor.Application.Converters/IntToMedalConverter.cs new file mode 100644 index 0000000..69a65ef --- /dev/null +++ b/Decompiler/Gestor.Application.Converters/IntToMedalConverter.cs @@ -0,0 +1,55 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Markup; +using System.Windows.Media; + +namespace Gestor.Application.Converters; + +public class IntToMedalConverter : MarkupExtension, IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //IL_0043: Unknown result type (might be due to invalid IL or missing references) + //IL_0076: Unknown result type (might be due to invalid IL or missing references) + //IL_0077: Unknown result type (might be due to invalid IL or missing references) + //IL_007d: Expected O, but got Unknown + //IL_0036: Unknown result type (might be due to invalid IL or missing references) + //IL_003b: Unknown result type (might be due to invalid IL or missing references) + //IL_0041: Expected O, but got Unknown + //IL_002b: Unknown result type (might be due to invalid IL or missing references) + //IL_0030: Unknown result type (might be due to invalid IL or missing references) + //IL_0036: Expected O, but got Unknown + //IL_0020: Unknown result type (might be due to invalid IL or missing references) + //IL_0025: Unknown result type (might be due to invalid IL or missing references) + //IL_002b: Expected O, but got Unknown + if (value != null) + { + switch ((int)value) + { + case 3: + return (object)new SolidColorBrush(Colors.Gold); + case 2: + return (object)new SolidColorBrush(Colors.Silver); + case 1: + return (object)new SolidColorBrush(Colors.SaddleBrown); + } + } + Color val = default(Color); + ((Color)(ref val)).A = 64; + ((Color)(ref val)).R = 200; + ((Color)(ref val)).G = 200; + ((Color)(ref val)).B = 200; + return (object)new SolidColorBrush(val); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return value; + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return this; + } +} -- cgit v1.2.3