1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2026-01-01 18:23:32 +00:00

Added support for the K70 Rapidfire, this fixes #103

This commit is contained in:
SpoinkyNL 2016-06-11 19:21:00 +02:00
parent 7a15bb398a
commit b2963ef16e
4 changed files with 9 additions and 4 deletions

View File

@ -39,7 +39,7 @@
<ProductName>Artemis</ProductName> <ProductName>Artemis</ProductName>
<PublisherName>Artemis</PublisherName> <PublisherName>Artemis</PublisherName>
<ApplicationRevision>0</ApplicationRevision> <ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.1.0.0</ApplicationVersion> <ApplicationVersion>1.1.2.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>

View File

@ -7,17 +7,20 @@ using CUE.NET;
using CUE.NET.Brushes; using CUE.NET.Brushes;
using CUE.NET.Devices.Generic.Enums; using CUE.NET.Devices.Generic.Enums;
using CUE.NET.Devices.Keyboard; using CUE.NET.Devices.Keyboard;
using Ninject.Extensions.Logging;
using Point = System.Drawing.Point; using Point = System.Drawing.Point;
namespace Artemis.DeviceProviders.Corsair namespace Artemis.DeviceProviders.Corsair
{ {
public class CorsairRGB : KeyboardProvider public class CorsairRGB : KeyboardProvider
{ {
public ILogger Logger { get; set; }
private CorsairKeyboard _keyboard; private CorsairKeyboard _keyboard;
private ImageBrush _keyboardBrush; private ImageBrush _keyboardBrush;
public CorsairRGB() public CorsairRGB(ILogger logger)
{ {
Logger = logger;
Name = "Corsair RGB Keyboards"; Name = "Corsair RGB Keyboards";
CantEnableText = "Couldn't connect to your Corsair keyboard.\n" + CantEnableText = "Couldn't connect to your Corsair keyboard.\n" +
"Please check your cables and/or drivers (could be outdated) and that Corsair Utility Engine is running.\n" + "Please check your cables and/or drivers (could be outdated) and that Corsair Utility Engine is running.\n" +
@ -57,6 +60,7 @@ namespace Artemis.DeviceProviders.Corsair
PreviewSettings = new PreviewSettings(676, 190, new Thickness(0, -15, 0, 0), Resources.k95); PreviewSettings = new PreviewSettings(676, 190, new Thickness(0, -15, 0, 0), Resources.k95);
break; break;
case "K70 RGB": case "K70 RGB":
case "K70 RGB RAPIDFIRE":
Height = 7; Height = 7;
Width = 21; Width = 21;
PreviewSettings = new PreviewSettings(676, 210, new Thickness(0, -25, 0, 0), Resources.k70); PreviewSettings = new PreviewSettings(676, 210, new Thickness(0, -25, 0, 0), Resources.k70);
@ -72,6 +76,7 @@ namespace Artemis.DeviceProviders.Corsair
PreviewSettings = new PreviewSettings(665, 215, new Thickness(0, -5, 0, 0), Resources.strafe); PreviewSettings = new PreviewSettings(665, 215, new Thickness(0, -5, 0, 0), Resources.strafe);
break; break;
} }
Logger.Debug("Corsair SDK reported device as: {0}", _keyboard.DeviceInfo.Model);
Slug = "corsair-" + _keyboard.DeviceInfo.Model.Replace(' ', '-').ToLower(); Slug = "corsair-" + _keyboard.DeviceInfo.Model.Replace(' ', '-').ToLower();
_keyboard.Brush = _keyboardBrush ?? (_keyboardBrush = new ImageBrush()); _keyboard.Brush = _keyboardBrush ?? (_keyboardBrush = new ImageBrush());
} }

View File

@ -15,7 +15,7 @@ namespace Artemis.Utilities
{ {
public static class Updater public static class Updater
{ {
public static int CurrentVersion = 111; public static int CurrentVersion = 112;
private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
public static async Task<Action> CheckForUpdate(MetroDialogService dialogService) public static async Task<Action> CheckForUpdate(MetroDialogService dialogService)

View File

@ -105,7 +105,7 @@
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.ColumnSpan="2" x:Name="ActiveEffectName" /> <TextBlock Grid.Row="0" Grid.ColumnSpan="2" x:Name="ActiveEffectName" />
<TextBlock Grid.Row="1" Grid.Column="0" Text="Artemis 1.1.1" VerticalAlignment="Center" <TextBlock Grid.Row="1" Grid.Column="0" Text="Artemis 1.1.2" VerticalAlignment="Center"
HorizontalAlignment="Left" /> HorizontalAlignment="Left" />
<Button Grid.Row="1" Grid.Column="1" Focusable="False" <Button Grid.Row="1" Grid.Column="1" Focusable="False"
Style="{StaticResource AccentedSquareButtonStyle}" Style="{StaticResource AccentedSquareButtonStyle}"