diff options
| author | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 15:29:41 +0000 |
|---|---|---|
| committer | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 15:29:41 +0000 |
| commit | 225aa1499e37faf9d38257caabbadc68d78b427e (patch) | |
| tree | 102bb7a40c58595348ae9d3c7076201759fe0720 /Decompiler/Gestor.Application.Converters/IntToMedalConverter.cs | |
| parent | 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (diff) | |
| download | gestor-225aa1499e37faf9d38257caabbadc68d78b427e.tar.gz gestor-225aa1499e37faf9d38257caabbadc68d78b427e.zip | |
decompiler.com
Diffstat (limited to 'Decompiler/Gestor.Application.Converters/IntToMedalConverter.cs')
| -rw-r--r-- | Decompiler/Gestor.Application.Converters/IntToMedalConverter.cs | 55 |
1 files changed, 55 insertions, 0 deletions
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; + } +} |