Added ambilight thumbnail

This commit is contained in:
DarthAffe committed 2016-11-01 12:05:59 +01:00
1 parent 5efacb381d
commit 410950ec6b
5 files changed
+17 -2

No files matched your search

+1
View File
@@ -912,6 +912,7 @@
<None Include="Modules\Games\EurotruckSimulator2\Resources\Win32\ets2-telemetry-server.dll" />
<None Include="Modules\Games\EurotruckSimulator2\Resources\Win64\ets2-telemetry-server.dll" />
<None Include="Resources\audio.png" />
<None Include="Resources\ambilight.png" />
<Content Include="Resources\CounterStrike\csgoGamestateConfiguration.txt" />
</ItemGroup>
<ItemGroup>
@@ -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);
}
+10
View File
@@ -60,6 +60,16 @@ namespace Artemis.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ambilight {
get {
object obj = ResourceManager.GetObject("ambilight", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@@ -211,4 +211,7 @@
<data name="lua_placeholder" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\lua-placeholder.lua;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="ambilight" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ambilight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B