From 4018a9cb8a1d162831cb40cf252aa834244d442b Mon Sep 17 00:00:00 2001 From: brandonscott Date: Tue, 26 Jul 2016 21:28:59 +0100 Subject: [PATCH 01/15] Update Devices.cs with new GUIDs. Man o' War was not added due to firmware issues. --- Corale.Colore/Razer/Devices.cs | 122 ++++++++++++++++++++++++++++++++- 1 file changed, 121 insertions(+), 1 deletion(-) diff --git a/Corale.Colore/Razer/Devices.cs b/Corale.Colore/Razer/Devices.cs index 5780b935..f8dab846 100644 --- a/Corale.Colore/Razer/Devices.cs +++ b/Corale.Colore/Razer/Devices.cs @@ -238,6 +238,23 @@ public static class Devices 0x98, 0x91); + /// + /// Blade 14 (2016 edition). + /// + [PublicAPI] + public static readonly Guid Blade14 = new Guid( + 0xf2bedfaf, + 0xa0fe, + 0x4651, + 0x9d, + 0x41, + 0xb6, + 0xce, + 0x60, + 0x3a, + 0x3d, + 0xdd); + /// /// Overwatch Keyboard. /// @@ -255,6 +272,40 @@ public static class Devices 0x72, 0xe4); + /// + /// Blackwidow X Keyboard. + /// + [PublicAPI] + public static readonly Guid BlackwidowX = new Guid( + 0x5af60076, + 0xade9, + 0x43d4, + 0xb5, + 0x74, + 0x52, + 0x59, + 0x92, + 0x93, + 0xb5, + 0x54); + + /// + /// Blackwidow X TE Keyboard. + /// + [PublicAPI] + public static readonly Guid BlackwidowXTe = new Guid( + 0x2d84dd51, + 0x3290, + 0x4aac, + 0x9a, + 0x89, + 0xd8, + 0xaf, + 0xde, + 0x38, + 0xb5, + 0x7c); + /// /// Mamba (wireless) Chroma edition. /// @@ -306,6 +357,74 @@ public static class Devices 0x5e, 0x98); + /// + /// Naga Hex V2 + /// + [PublicAPI] + public static readonly Guid NagaHex = new Guid( + 0x195d70f5, + 0xf285, + 0x4cff, + 0x99, + 0xf2, + 0xb8, + 0xc0, + 0xe9, + 0x65, + 0x8d, + 0xb4); + + /// + /// Core (external graphics enclosure). + /// + [PublicAPI] + public static readonly Guid Core = new Guid( + 0x201203b, + 0x62f3, + 0x4c50, + 0x83, + 0xdd, + 0x59, + 0x8b, + 0xab, + 0xd2, + 0x8, + 0xe0); + + /// + /// Chroma enabled Lenovo Y900. + /// + [PublicAPI] + public static readonly Guid LenovoY900 = new Guid( + 0x35f6f18d, + 0x1ae5, + 0x436c, + 0xa5, + 0x75, + 0xab, + 0x44, + 0xa1, + 0x27, + 0x90, + 0x3a); + + /// + /// Chroma enabled Lenovo Y27. + /// + [PublicAPI] + public static readonly Guid LenovoY27 = new Guid( + 0x47db1fa7, + 0x6b9b, + 0x4ee6, + 0xb6, + 0xf4, + 0x40, + 0x71, + 0xa3, + 0xb2, + 0x5, + 0x3b); + /// /// Returns whether a specified is a valid device identifier. /// @@ -317,7 +436,8 @@ public static bool IsValidId(Guid id) return id == Blackwidow || id == Deathadder || id == Orbweaver || id == Tartarus || id == MambaTe || id == BlackwidowTe || id == Kraken71 || id == Firefly || id == Deathstalker || id == Diamondback || id == Mamba || id == OverwatchKeyboard || id == Orochi || id == BladeStealth || id == Naga - || id == NagaEpic; + || id == NagaEpic || id == Core || id == LenovoY27 || id == LenovoY900 || id == Blade14 || id == BlackwidowX + || id == BlackwidowXTe || id == NagaHex; } } } From d6e3200e3b898ea06a96926752a70170a4a9814e Mon Sep 17 00:00:00 2001 From: Adam Hellberg Date: Wed, 27 Jul 2016 13:02:29 +0200 Subject: [PATCH 02/15] Update badges in readme * Removed NuGet downloads badge since it seems to be defunct. * Removed build and coverage badges for master branch since they aren't very helpful. --- README.md | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 2d2f56ab..8baa2100 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,12 @@ Colore ====== +[![Build status][devbuildbadge]][devbuild] +[![Coverage Status][devcoverbadge]][devcover] [![Stories in Ready][wafflebadge]][waffle] [![MIT License][licensebadge]][license] [![Latest GitHub release][ghreleasebadge]][ghrelease] [![NuGet version][ngverbadge]][ng] -[![NuGet downloads][ngdlbadge]][ng] - -**Develop:** -[![Build status][devbuildbadge]][devbuild] -[![Coverage Status][devcoverbadge]][devcover] - -**Master:** -[![Master build status][masterbuildbadge]][masterbuild] -[![Master coverage Status][mastercoverbadge]][mastercover] A powerful and elegant C# library for Razer Chroma's SDK @@ -105,17 +98,11 @@ Current projects utilizing this or modified versions of this library: [ghreleasebadge]: https://img.shields.io/github/release/CoraleStudios/Colore.svg [ng]: https://www.nuget.org/packages/Colore [ngverbadge]: https://img.shields.io/nuget/v/Colore.svg -[ngdlbadge]: https://img.shields.io/nuget/dt/Colore.svg [devbuild]: http://tc.coralestudios.com/viewType.html?buildTypeId=colore_mainbuild [devbuildbadge]: https://img.shields.io/teamcity/http/tc.coralestudios.com/s/colore_mainbuild.svg?style=flat [devcover]: https://coveralls.io/r/CoraleStudios/Colore?branch=develop [devcoverbadge]: https://coveralls.io/repos/CoraleStudios/Colore/badge.svg?branch=develop -[masterbuild]: http://tc.coralestudios.com/viewType.html?buildTypeId=colore_releasebuild -[masterbuildbadge]: https://img.shields.io/teamcity/http/tc.coralestudios.com/s/colore_releasebuild.svg?style=flat -[mastercover]: https://coveralls.io/r/CoraleStudios/Colore?branch=master -[mastercoverbadge]: https://coveralls.io/repos/CoraleStudios/Colore/badge.svg?branch=master - [gitter]: https://gitter.im/CoraleStudios/Colore?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge [gitterbadge]: https://badges.gitter.im/Join%20Chat.svg From 443a7d304ef841a76c5d91fb9918d561ca535611 Mon Sep 17 00:00:00 2001 From: Nico Date: Thu, 28 Jul 2016 18:27:53 +0100 Subject: [PATCH 03/15] Add logo to Readme.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2d2f56ab..dfcc2bbe 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -Colore -====== +![Colore Logo][colorelogo] [![Stories in Ready][wafflebadge]][waffle] [![MIT License][licensebadge]][license] @@ -119,3 +118,5 @@ Current projects utilizing this or modified versions of this library: [gitter]: https://gitter.im/CoraleStudios/Colore?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge [gitterbadge]: https://badges.gitter.im/Join%20Chat.svg + +[colorelogo]: http://coralestudios.github.io/Colore/colore.png From fa80593a4df709b0f296f7eff8ad20f2d7f564b5 Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 29 Jul 2016 15:10:39 +0100 Subject: [PATCH 04/15] Update logo on Readme.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dfcc2bbe..acecfe90 100644 --- a/README.md +++ b/README.md @@ -119,4 +119,4 @@ Current projects utilizing this or modified versions of this library: [gitter]: https://gitter.im/CoraleStudios/Colore?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge [gitterbadge]: https://badges.gitter.im/Join%20Chat.svg -[colorelogo]: http://coralestudios.github.io/Colore/colore.png +[colorelogo]: https://raw.githubusercontent.com/CoraleStudios/Colore/gh-pages/colore-logo.png From 9b273235855c1dd9e8d91fe3a97f0a85dd9a9014 Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 29 Jul 2016 16:41:26 +0100 Subject: [PATCH 05/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index acecfe90..49afbe4f 100644 --- a/README.md +++ b/README.md @@ -119,4 +119,4 @@ Current projects utilizing this or modified versions of this library: [gitter]: https://gitter.im/CoraleStudios/Colore?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge [gitterbadge]: https://badges.gitter.im/Join%20Chat.svg -[colorelogo]: https://raw.githubusercontent.com/CoraleStudios/Colore/gh-pages/colore-logo.png +[colorelogo]: https://raw.githubusercontent.com/CoraleStudios/Colore/gh-pages/colore.png From 456cdb916611db3a9724dcfb0eb8f32bd29da9b8 Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 29 Jul 2016 21:07:41 +0100 Subject: [PATCH 06/15] Update location of the logo for Readme.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 49afbe4f..bfddc5e5 100644 --- a/README.md +++ b/README.md @@ -119,4 +119,4 @@ Current projects utilizing this or modified versions of this library: [gitter]: https://gitter.im/CoraleStudios/Colore?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge [gitterbadge]: https://badges.gitter.im/Join%20Chat.svg -[colorelogo]: https://raw.githubusercontent.com/CoraleStudios/Colore/gh-pages/colore.png +[colorelogo]: https://github.com/CoraleStudios/Colore/blob/gh-pages/img/colore.png?raw=true From 57c92806f6a8427ab60caee943f1f3ae244eceed Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 30 Jul 2016 00:55:56 +0100 Subject: [PATCH 07/15] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bfddc5e5..c7d76923 100644 --- a/README.md +++ b/README.md @@ -119,4 +119,4 @@ Current projects utilizing this or modified versions of this library: [gitter]: https://gitter.im/CoraleStudios/Colore?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge [gitterbadge]: https://badges.gitter.im/Join%20Chat.svg -[colorelogo]: https://github.com/CoraleStudios/Colore/blob/gh-pages/img/colore.png?raw=true +[colorelogo]: http://colore.coralestudios.com/img/colore.png From 4c6acb8d5d9b443b6870f50e8a0088abeb75a0bb Mon Sep 17 00:00:00 2001 From: Adam Hellberg Date: Sat, 10 Sep 2016 21:13:18 +0200 Subject: [PATCH 08/15] Set the version of the Colore dependency explicitly Newer version of NuGet assumes lowest version of a package when the version string is left out for some reason. --- .../Corale.Colore.WinForms.nuspec | 2 +- Corale.Colore.Wpf/Corale.Colore.Wpf.nuspec | 2 +- set_version.ps1 | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Corale.Colore.WinForms/Corale.Colore.WinForms.nuspec b/Corale.Colore.WinForms/Corale.Colore.WinForms.nuspec index dc3c1727..b56caf86 100644 --- a/Corale.Colore.WinForms/Corale.Colore.WinForms.nuspec +++ b/Corale.Colore.WinForms/Corale.Colore.WinForms.nuspec @@ -13,7 +13,7 @@ Copyright (c) 2016 by Adam Hellberg and Brandon Scott. Razer Chroma Corale WinForms Colore - + diff --git a/Corale.Colore.Wpf/Corale.Colore.Wpf.nuspec b/Corale.Colore.Wpf/Corale.Colore.Wpf.nuspec index 3c5cbcdc..149ac6d3 100644 --- a/Corale.Colore.Wpf/Corale.Colore.Wpf.nuspec +++ b/Corale.Colore.Wpf/Corale.Colore.Wpf.nuspec @@ -13,7 +13,7 @@ Copyright (c) 2016 by Adam Hellberg and Brandon Scott. Razer Chroma Corale WPF Colore - + diff --git a/set_version.ps1 b/set_version.ps1 index b4667201..9b14cf7b 100644 --- a/set_version.ps1 +++ b/set_version.ps1 @@ -68,6 +68,20 @@ function Update-File Out-File $file } +function Update-NuSpec +{ + Param([String]$file) + + Write-Host "Updating Colore depend version in file $file" + + (Get-Content $file) ` + -replace 'COLORE_VERSION', "$friendlyVersion" | + Out-File $file +} + Update-File Corale.Colore/Properties/AssemblyInfo.cs Update-File Corale.Colore.Wpf/Properties/AssemblyInfo.cs Update-File Corale.Colore.WinForms/Properties/AssemblyInfo.cs + +Update-NuSpec Corale.Colore.Wpf/Corale.Colore.Wpf.nuspec +Update-NuSpec Corale.Colore.WinForms/Corale.Colore.WinForms.nuspec From 0478457639538cd8a22ab3b8c846ad3e46f6bc65 Mon Sep 17 00:00:00 2001 From: Adam Hellberg Date: Wed, 12 Oct 2016 19:56:10 +0200 Subject: [PATCH 09/15] Update Clear methods to clear internal state * Keyboard will now clear its custom grid on Clear. * Keypad will now clear its custom grid on Clear. * Mouse will now clear both its custom grids on Clear. * Mousepad will now clear its custom effect on Clear. --- Corale.Colore/Core/Keyboard.cs | 1 + Corale.Colore/Core/Keypad.cs | 1 + Corale.Colore/Core/Mouse.cs | 2 ++ Corale.Colore/Core/Mousepad.cs | 1 + 4 files changed, 5 insertions(+) diff --git a/Corale.Colore/Core/Keyboard.cs b/Corale.Colore/Core/Keyboard.cs index 1884affd..ba0cd913 100644 --- a/Corale.Colore/Core/Keyboard.cs +++ b/Corale.Colore/Core/Keyboard.cs @@ -362,6 +362,7 @@ public void SetStarlight(Starlight effect) /// public override void Clear() { + _grid.Clear(); SetEffect(Effect.None); } } diff --git a/Corale.Colore/Core/Keypad.cs b/Corale.Colore/Core/Keypad.cs index df8e9c91..99b23f17 100644 --- a/Corale.Colore/Core/Keypad.cs +++ b/Corale.Colore/Core/Keypad.cs @@ -233,6 +233,7 @@ public void SetWave(Direction direction) /// public override void Clear() { + _custom.Clear(); SetEffect(Effect.None); } } diff --git a/Corale.Colore/Core/Mouse.cs b/Corale.Colore/Core/Mouse.cs index 0daf0f28..d8fe84bf 100644 --- a/Corale.Colore/Core/Mouse.cs +++ b/Corale.Colore/Core/Mouse.cs @@ -371,6 +371,8 @@ public void SetGrid(CustomGrid effect) /// public override void Clear() { + _custom.Clear(); + _customGrid.Clear(); SetEffect(Effect.None); } } diff --git a/Corale.Colore/Core/Mousepad.cs b/Corale.Colore/Core/Mousepad.cs index 1907b949..0956b509 100644 --- a/Corale.Colore/Core/Mousepad.cs +++ b/Corale.Colore/Core/Mousepad.cs @@ -196,6 +196,7 @@ public void SetCustom(Custom effect) /// public override void Clear() { + _custom.Clear(); SetEffect(Effect.None); } } From 4b5585bb38fdebfdae9ae5233bd7f21c7fcb0e5d Mon Sep 17 00:00:00 2001 From: Adam Hellberg Date: Wed, 12 Oct 2016 21:37:53 +0200 Subject: [PATCH 10/15] Add version property to Chroma class --- Corale.Colore/Core/Chroma.cs | 7 ++++++- Corale.Colore/Core/IChroma.cs | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Corale.Colore/Core/Chroma.cs b/Corale.Colore/Core/Chroma.cs index 3d43483d..a86d5a01 100644 --- a/Corale.Colore/Core/Chroma.cs +++ b/Corale.Colore/Core/Chroma.cs @@ -27,7 +27,6 @@ namespace Corale.Colore.Core { using System; using System.Diagnostics.CodeAnalysis; - using System.Security; using Corale.Colore.Annotations; using Corale.Colore.Events; @@ -75,6 +74,7 @@ public sealed class Chroma : IChroma /// private Chroma() { + Version = typeof(Chroma).Assembly.GetName().Version; Initialize(); } @@ -181,6 +181,11 @@ public static IChroma Instance /// public SdkVersion SdkVersion => _sdkVersion; + /// + /// Gets the of Colore. + /// + public Version Version { get; } + /// /// Initializes the SDK if it hasn't already. /// diff --git a/Corale.Colore/Core/IChroma.cs b/Corale.Colore/Core/IChroma.cs index 0c4a1993..2aaefa06 100644 --- a/Corale.Colore/Core/IChroma.cs +++ b/Corale.Colore/Core/IChroma.cs @@ -118,6 +118,12 @@ public interface IChroma [PublicAPI] SdkVersion SdkVersion { get; } + /// + /// Gets the of Colore. + /// + [PublicAPI] + Version Version { get; } + /// /// Initializes the SDK if it hasn't already. /// From 09e7adf2a63e4b612cae7fc087151f0413ec1137 Mon Sep 17 00:00:00 2001 From: Wolfspirit Date: Tue, 18 Oct 2016 18:28:38 +0200 Subject: [PATCH 11/15] Swap backslash and forward slash name to be correct --- Corale.Colore/Razer/Keyboard/Key.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Corale.Colore/Razer/Keyboard/Key.cs b/Corale.Colore/Razer/Keyboard/Key.cs index d29af658..dd149f1f 100644 --- a/Corale.Colore/Razer/Keyboard/Key.cs +++ b/Corale.Colore/Razer/Keyboard/Key.cs @@ -660,11 +660,11 @@ public enum Key OemRightBracket = 0x020D, /// - /// Forwards slash (/) key. + /// Backslash (\) key. /// [PublicAPI] [UnsafeKey] - OemSlash = 0x020E, + OemBackslash = 0x020E, /// /// Semi-colon (;) key. @@ -691,10 +691,10 @@ public enum Key OemPeriod = 0x040B, /// - /// Backslash (\) key. + /// Forwards slash (/) key. /// [PublicAPI] - OemBackslash = 0x040C, + OemSlash = 0x040C, /// /// Pound sign (#) key. From d0e66d20ff6d63411e728cfe27472104334f01cf Mon Sep 17 00:00:00 2001 From: Nicholas Martin Date: Mon, 7 Nov 2016 16:09:35 +0000 Subject: [PATCH 12/15] Adds Ornata support --- Corale.Colore/Razer/Devices.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Corale.Colore/Razer/Devices.cs b/Corale.Colore/Razer/Devices.cs index f8dab846..3a166ebb 100644 --- a/Corale.Colore/Razer/Devices.cs +++ b/Corale.Colore/Razer/Devices.cs @@ -425,6 +425,23 @@ public static class Devices 0x5, 0x3b); + /// + /// Razer Ornata Keypad. + /// + [PublicAPI] + public static readonly Guid Ornata = new Guid( + 0x803378c1, + 0xcc48, + 0x4970, + 0x85, + 0x39, + 0xd8, + 0x28, + 0xcc, + 0x1d, + 0x42, + 0xa); + /// /// Returns whether a specified is a valid device identifier. /// @@ -437,7 +454,7 @@ public static bool IsValidId(Guid id) || id == BlackwidowTe || id == Kraken71 || id == Firefly || id == Deathstalker || id == Diamondback || id == Mamba || id == OverwatchKeyboard || id == Orochi || id == BladeStealth || id == Naga || id == NagaEpic || id == Core || id == LenovoY27 || id == LenovoY900 || id == Blade14 || id == BlackwidowX - || id == BlackwidowXTe || id == NagaHex; + || id == BlackwidowXTe || id == NagaHex || id == Ornata; } } } From 4db35894aaf60b98bd8c59400a598f09b31a830c Mon Sep 17 00:00:00 2001 From: Nicholas Martin Date: Mon, 7 Nov 2016 16:14:39 +0000 Subject: [PATCH 13/15] Fixed typo with Ornata Keyboard --- Corale.Colore/Razer/Devices.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Corale.Colore/Razer/Devices.cs b/Corale.Colore/Razer/Devices.cs index 3a166ebb..0f7f9b78 100644 --- a/Corale.Colore/Razer/Devices.cs +++ b/Corale.Colore/Razer/Devices.cs @@ -426,7 +426,7 @@ public static class Devices 0x3b); /// - /// Razer Ornata Keypad. + /// Razer Ornata Keyboard. /// [PublicAPI] public static readonly Guid Ornata = new Guid( From 75fd4aabd36e2bd22e96e45631e0b64cd64a9950 Mon Sep 17 00:00:00 2001 From: Nicholas Martin Date: Mon, 7 Nov 2016 21:06:16 +0000 Subject: [PATCH 14/15] Removed references to starlight Starlight has been removed by Razer and replaced with `RESERVED` --- Corale.Colore.Tester/MainWindow.xaml | 10 -- .../ViewModels/KeyboardViewModel.cs | 58 --------- .../Corale.Colore.Tests.csproj | 2 - .../Razer/Effects/StarlightTests.cs | 86 ------------- .../Razer/Keyboard/Effects/StarlightTests.cs | 68 ----------- Corale.Colore/Corale.Colore.csproj | 4 - Corale.Colore/Core/GenericDevice.cs | 31 ----- Corale.Colore/Core/IGenericDevice.cs | 25 ---- Corale.Colore/Core/Keyboard.cs | 9 -- Corale.Colore/Razer/Effects/Starlight.cs | 113 ------------------ Corale.Colore/Razer/Effects/StarlightType.cs | 45 ------- .../Razer/Keyboard/Effects/Starlight.cs | 78 ------------ .../Razer/Keyboard/Effects/StarlightType.cs | 47 -------- 13 files changed, 576 deletions(-) delete mode 100644 Corale.Colore.Tests/Razer/Effects/StarlightTests.cs delete mode 100644 Corale.Colore.Tests/Razer/Keyboard/Effects/StarlightTests.cs delete mode 100644 Corale.Colore/Razer/Effects/Starlight.cs delete mode 100644 Corale.Colore/Razer/Effects/StarlightType.cs delete mode 100644 Corale.Colore/Razer/Keyboard/Effects/Starlight.cs delete mode 100644 Corale.Colore/Razer/Keyboard/Effects/StarlightType.cs diff --git a/Corale.Colore.Tester/MainWindow.xaml b/Corale.Colore.Tester/MainWindow.xaml index 54d979c2..518729b7 100644 --- a/Corale.Colore.Tester/MainWindow.xaml +++ b/Corale.Colore.Tester/MainWindow.xaml @@ -42,16 +42,6 @@ ItemsSource="{Binding WaveDirectionValues}" SelectedItem="{Binding SelectedWaveDirection, Mode=TwoWay}" /> - -