From 410950ec6b5a112a931aa2e56173b33bb2c5c3b5 Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Tue, 1 Nov 2016 12:05:59 +0100 Subject: [PATCH] Added ambilight thumbnail --- Artemis/Artemis/Artemis.csproj | 1 + .../Layers/Types/AmbientLight/AmbientLightType.cs | 5 +++-- Artemis/Artemis/Properties/Resources.Designer.cs | 10 ++++++++++ Artemis/Artemis/Properties/Resources.resx | 3 +++ Artemis/Artemis/Resources/ambilight.png | Bin 0 -> 871 bytes 5 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 Artemis/Artemis/Resources/ambilight.png diff --git a/Artemis/Artemis/Artemis.csproj b/Artemis/Artemis/Artemis.csproj index 8aba00f66..65ee578e1 100644 --- a/Artemis/Artemis/Artemis.csproj +++ b/Artemis/Artemis/Artemis.csproj @@ -912,6 +912,7 @@ + diff --git a/Artemis/Artemis/Profiles/Layers/Types/AmbientLight/AmbientLightType.cs b/Artemis/Artemis/Profiles/Layers/Types/AmbientLight/AmbientLightType.cs index 67c53fae2..9cdfdc856 100644 --- a/Artemis/Artemis/Profiles/Layers/Types/AmbientLight/AmbientLightType.cs +++ b/Artemis/Artemis/Profiles/Layers/Types/AmbientLight/AmbientLightType.cs @@ -11,6 +11,8 @@ using Artemis.Profiles.Layers.Types.AmbientLight.AmbienceCreator; using Artemis.Profiles.Layers.Types.AmbientLight.Model; using Artemis.Profiles.Layers.Types.AmbientLight.Model.Extensions; using Artemis.Profiles.Layers.Types.AmbientLight.ScreenCapturing; +using Artemis.Properties; +using Artemis.Utilities; using Artemis.ViewModels.Profiles; using Newtonsoft.Json; @@ -81,11 +83,10 @@ namespace Artemis.Profiles.Layers.Types.AmbientLight public ImageSource DrawThumbnail(LayerModel layer) { - //TODO DarthAffe 30.10.2016: Add a real thumbnail Rect thumbnailRect = new Rect(0, 0, 18, 18); DrawingVisual visual = new DrawingVisual(); using (DrawingContext c = visual.RenderOpen()) - c.DrawRectangle(new SolidColorBrush(Colors.Magenta), new Pen(new SolidColorBrush(Colors.DarkMagenta), 2), thumbnailRect); + c.DrawImage(ImageUtilities.BitmapToBitmapImage(Resources.ambilight), thumbnailRect); return new DrawingImage(visual.Drawing); } diff --git a/Artemis/Artemis/Properties/Resources.Designer.cs b/Artemis/Artemis/Properties/Resources.Designer.cs index f9f421337..207ddd094 100644 --- a/Artemis/Artemis/Properties/Resources.Designer.cs +++ b/Artemis/Artemis/Properties/Resources.Designer.cs @@ -60,6 +60,16 @@ namespace Artemis.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ambilight { + get { + object obj = ResourceManager.GetObject("ambilight", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/Artemis/Artemis/Properties/Resources.resx b/Artemis/Artemis/Properties/Resources.resx index 537017134..44eae2ca5 100644 --- a/Artemis/Artemis/Properties/Resources.resx +++ b/Artemis/Artemis/Properties/Resources.resx @@ -211,4 +211,7 @@ ..\Resources\lua-placeholder.lua;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\ambilight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Artemis/Artemis/Resources/ambilight.png b/Artemis/Artemis/Resources/ambilight.png new file mode 100644 index 0000000000000000000000000000000000000000..7525f6acdd198338284ec184c4cc0f042ed5106c GIT binary patch literal 871 zcmV-t1DO1YP) zoAGf!@YmM^`#wRfNCf}`e);(av}`|9wl|o8<$D+e-3$4$W0)ys#$htH-wyn{edO_! zaJAyiFofcS&HWLF2Lwa}2??4{ET{B48*_?vUeo)By~86fSwfr z&p;T)Rn9z2)-sj!(x|+#LpTsbqEZO`t|)76Y5MVbcb#<}=i<9hMw* zFl-6+XiR%ydYo82y`%m1BX?sY$ADh6yyzm!*szF7*POGtXi;4|m>iZ3tH1=7p`MIs zx1+0nvx&d)Vl`(oZ)t)@L;!G3Q14h>&QZAxsBf@phzDr|X+bU&SzqxyDZlF*n67y| zBu>Y~I3#kKm`X)3^rAg)R8>F)nF%s?$ST6(nkSy|_Wdp1|HI2?uW8pEyHn=rkQn+z z9t$>Ad^bboLXg%WQILheJYw;RDp!1Zc;M!=r!8+;bw3gHn$^4k^+*iRpUs#xs4awA z1?e2F4Mk^Q37)WBip;zES{JD#2hW x%1iaM^D_uQal~+q(@UJYIA4Z$AT6)D$bU+OqiB^`IlKS>002ovPDHLkV1hHQhS2~3 literal 0 HcmV?d00001