mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2026-11-11 04:56:44 +00:00
Added basic CUE-Profile loading
This commit is contained in:
1 parent
074f823fd7
commit
0b6ba617ac
7 files changed
+406
No files matched your search
@@ -11,6 +11,7 @@ using CUE.NET.Devices.Keyboard.Extensions;
|
||||
using CUE.NET.Devices.Keyboard.Keys;
|
||||
using CUE.NET.Exceptions;
|
||||
using CUE.NET.Gradients;
|
||||
using CUE.NET.Profiles;
|
||||
|
||||
namespace SimpleDevTest
|
||||
{
|
||||
@@ -38,6 +39,40 @@ namespace SimpleDevTest
|
||||
if (keyboard == null)
|
||||
throw new WrapperException("No keyboard found");
|
||||
|
||||
keyboard.Brush = new SolidColorBrush(Color.Black);
|
||||
keyboard.Update();
|
||||
|
||||
Wait(3);
|
||||
|
||||
keyboard.Brush = CueProfiles.LoadProfileByID()[null];
|
||||
keyboard.Update();
|
||||
|
||||
Wait(3);
|
||||
|
||||
// My Profile 'K95 RGB Default 2' is all black - this could lead to different behavior than cue has since transparent isn't black in CUE.NET
|
||||
// To swap a profile like CUE does we would need to black out the keyboard before
|
||||
// OR work with a key group containing all keys and leave the background black - this should be always the prefered solution
|
||||
keyboard.Brush = new SolidColorBrush(Color.Black);
|
||||
keyboard.Update();
|
||||
keyboard.Brush = CueProfiles.LoadProfileByID()["K95 RGB Default 2"];
|
||||
keyboard.Update();
|
||||
|
||||
Wait(3);
|
||||
|
||||
return;
|
||||
|
||||
ListKeyGroup keyGroup = new ListKeyGroup(keyboard, keyboard['R'].KeyId);
|
||||
keyGroup.Brush = new SolidColorBrush(Color.White);
|
||||
keyboard.Update();
|
||||
Wait(2);
|
||||
keyGroup.RemoveKey(keyboard['R'].KeyId);
|
||||
keyboard['R'].Led.Color = Color.Black;
|
||||
keyGroup.AddKey(keyboard['T'].KeyId);
|
||||
keyboard.Update();
|
||||
|
||||
Wait(10);
|
||||
|
||||
return;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// First we'll look at some basic coloring
|
||||
|
||||
Reference in new issue
Block a user