mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Core port - Targeting .NET Core 3.1!
Core port - Updated projects to new project layout Core port - Changed the way devices are identified to be consistent across different frameworks Core port - Updated plugin system to no longer use AppDomain but AssemblyLoadContext (through McMaster.NETCore.Plugins) Core port - Renamed a few events to keep Fody from getting confused
This commit is contained in:
1 parent
46a738e1a0
commit
b3f6aef101
61 files changed
+537
-2031
No files matched your search
@@ -1,33 +0,0 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Artemis.UI.Converters
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Converts <see cref="T:System.Drawing.Color" /> into <see cref="T:System.Windows.Media.Color" />.
|
||||
/// </summary>
|
||||
[ValueConversion(typeof(Color), typeof(System.Windows.Media.Color))]
|
||||
public class ColorToDrawingColorConverter : IValueConverter
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is Color drawingColor)
|
||||
return System.Windows.Media.Color.FromArgb(drawingColor.A, drawingColor.R, drawingColor.G, drawingColor.B);
|
||||
|
||||
return default(System.Windows.Media.Color);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is System.Windows.Media.Color mediaColor)
|
||||
return Color.FromArgb(mediaColor.A, mediaColor.R, mediaColor.G, mediaColor.B);
|
||||
|
||||
return default(Color);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user