mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Added Corsair support as a plugin
This commit is contained in:
1 parent
6e23c079b1
commit
8cd8b051f7
25 files changed
+302
-131
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user