Added Corsair support as a plugin

This commit is contained in:
SpoinkyNL committed 2019-08-11 16:58:43 +02:00
1 parent 6e23c079b1
commit 8cd8b051f7
25 files changed
+302 -131

No files matched your search

-5
View File
@@ -108,9 +108,6 @@
<Reference Include="RGB.NET.Decorators, Version=0.1.25.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RGB.NET.Decorators.0.1.25\lib\net45\RGB.NET.Decorators.dll</HintPath>
</Reference>
<Reference Include="RGB.NET.Devices.Corsair, Version=0.1.25.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RGB.NET.Devices.Corsair.0.1.25\lib\net45\RGB.NET.Devices.Corsair.dll</HintPath>
</Reference>
<Reference Include="RGB.NET.Groups, Version=0.1.25.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\RGB.NET.Groups.0.1.25\lib\net45\RGB.NET.Groups.dll</HintPath>
</Reference>
@@ -309,13 +306,11 @@
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Fody.4.2.1\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.4.2.1\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets'))" />
<Error Condition="!Exists('..\packages\PropertyChanged.Fody.2.6.1\build\PropertyChanged.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\PropertyChanged.Fody.2.6.1\build\PropertyChanged.Fody.props'))" />
<Error Condition="!Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.linux.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.linux.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SQLitePCLRaw.lib.e_sqlite3.linux.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.linux.targets'))" />
<Error Condition="!Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.osx.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.osx.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SQLitePCLRaw.lib.e_sqlite3.osx.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.osx.targets'))" />
<Error Condition="!Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.v110_xp.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.v110_xp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SQLitePCLRaw.lib.e_sqlite3.v110_xp.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.v110_xp.targets'))" />
</Target>
<Import Project="..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets" Condition="Exists('..\packages\RGB.NET.Resources.Corsair.0.3.0.234\build\RGB.NET.Resources.Corsair.targets')" />
<Import Project="..\packages\SQLitePCLRaw.lib.e_sqlite3.linux.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.linux.targets" Condition="Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.linux.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.linux.targets')" />
<Import Project="..\packages\SQLitePCLRaw.lib.e_sqlite3.osx.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.osx.targets" Condition="Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.osx.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.osx.targets')" />
<Import Project="..\packages\SQLitePCLRaw.lib.e_sqlite3.v110_xp.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.v110_xp.targets" Condition="Exists('..\packages\SQLitePCLRaw.lib.e_sqlite3.v110_xp.1.1.12\build\net35\SQLitePCLRaw.lib.e_sqlite3.v110_xp.targets')" />
@@ -71,13 +71,37 @@ namespace Artemis.UI.ViewModels.Controls.RgbDevice
public void Update()
{
FillColor = Color.FromRgb((byte) Math.Round(255 * Led.Color.R), (byte) Math.Round(255 * Led.Color.G), (byte) Math.Round(255 * Led.Color.B));
X = Led.LedRectangle.X;
Y = Led.LedRectangle.Y;
Width = Led.LedRectangle.Width;
Height = Led.LedRectangle.Height;
// Not leveraging on OnPropertyChanged since that'll update for each updated property
var changed = false;
if (DisplayDrawing != null)
var newFillColor = Color.FromRgb((byte) Math.Round(255 * Led.Color.R), (byte) Math.Round(255 * Led.Color.G), (byte) Math.Round(255 * Led.Color.B));
if (!newFillColor.Equals(FillColor))
{
FillColor = newFillColor;
changed = true;
}
if (Math.Abs(Led.LedRectangle.X - X) > 0.1)
{
X = Led.LedRectangle.X;
changed = true;
}
if (Math.Abs(Led.LedRectangle.Y - Y) > 0.1)
{
Y = Led.LedRectangle.Y;
changed = true;
}
if (Math.Abs(Led.LedRectangle.Width - Width) > 0.1)
{
Width = Led.LedRectangle.Width;
changed = true;
}
if (Math.Abs(Led.LedRectangle.Height - Height) > 0.1)
{
Height = Led.LedRectangle.Height;
changed = true;
}
if (DisplayDrawing != null && changed)
{
Execute.OnUIThread(() =>
{
@@ -28,7 +28,7 @@ namespace Artemis.UI.ViewModels.Screens
// Sync up with the plugin service
Modules = new BindableCollection<Module>();
Modules.AddRange(_pluginService.GetPluginsOfType<Module>());
// Modules.AddRange(_pluginService.GetPluginsOfType<Module>());
_pluginService.PluginEnabled += PluginServiceOnPluginEnabled;
_pluginService.PluginDisabled += PluginServiceOnPluginDisabled;
-2
View File
@@ -17,9 +17,7 @@
<package id="RGB.NET.Brushes" version="0.1.25" targetFramework="net472" />
<package id="RGB.NET.Core" version="0.1.25" targetFramework="net472" />
<package id="RGB.NET.Decorators" version="0.1.25" targetFramework="net472" />
<package id="RGB.NET.Devices.Corsair" version="0.1.25" targetFramework="net472" />
<package id="RGB.NET.Groups" version="0.1.25" targetFramework="net472" />
<package id="RGB.NET.Resources.Corsair" version="0.3.0.234" targetFramework="net461" />
<package id="SharpVectors.Reloaded" version="1.3.0" targetFramework="net472" />
<package id="SQLitePCLRaw.bundle_green" version="1.1.12" targetFramework="net472" />
<package id="SQLitePCLRaw.core" version="1.1.12" targetFramework="net472" />