summaryrefslogtreecommitdiff
path: root/Decompiler/Gestor.Application.Converters/PackIconToImage.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Decompiler/Gestor.Application.Converters/PackIconToImage.cs')
-rw-r--r--Decompiler/Gestor.Application.Converters/PackIconToImage.cs55
1 files changed, 55 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.Converters/PackIconToImage.cs b/Decompiler/Gestor.Application.Converters/PackIconToImage.cs
new file mode 100644
index 0000000..6ef2f02
--- /dev/null
+++ b/Decompiler/Gestor.Application.Converters/PackIconToImage.cs
@@ -0,0 +1,55 @@
+using System.Windows.Media;
+using ControlzEx;
+using MaterialDesignThemes.Wpf;
+
+namespace Gestor.Application.Converters;
+
+public class PackIconToImage
+{
+ public static ImageSource CreateImageSource(object value, Brush foregroundBrush, double penThickness)
+ {
+ //IL_001f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0024: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0026: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0030: Expected O, but got Unknown
+ //IL_0018: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0031: Expected O, but got Unknown
+ //IL_0031: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0036: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0047: Unknown result type (might be due to invalid IL or missing references)
+ //IL_004e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0051: Unknown result type (might be due to invalid IL or missing references)
+ //IL_005b: Expected O, but got Unknown
+ //IL_005c: Expected O, but got Unknown
+ //IL_005c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0061: Unknown result type (might be due to invalid IL or missing references)
+ //IL_006e: Expected O, but got Unknown
+ //IL_006e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0073: Unknown result type (might be due to invalid IL or missing references)
+ //IL_007b: Expected O, but got Unknown
+ _003F val;
+ if (!(value.GetType() == typeof(PackIconKind)))
+ {
+ val = (PackIcon)value;
+ }
+ else
+ {
+ val = new PackIcon();
+ ((PackIconBase<PackIconKind>)val).Kind = (PackIconKind)value;
+ }
+ PackIcon val2 = (PackIcon)val;
+ GeometryDrawing val3 = new GeometryDrawing
+ {
+ Geometry = Geometry.Parse(((PackIconBase<PackIconKind>)(object)val2).Data),
+ Brush = foregroundBrush,
+ Pen = new Pen(foregroundBrush, penThickness)
+ };
+ DrawingGroup val4 = new DrawingGroup();
+ val4.Children.Add((Drawing)(object)val3);
+ DrawingGroup drawing = val4;
+ return (ImageSource)new DrawingImage
+ {
+ Drawing = (Drawing)(object)drawing
+ };
+ }
+}