mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Updated CUE.NET
This commit is contained in:
parent
358dcaa340
commit
8736e5562c
@ -151,9 +151,9 @@
|
||||
<HintPath>..\packages\Colore.5.0.0\lib\net35\Corale.Colore.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="CUE.NET, Version=1.0.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>lib\CUE.NET.dll</HintPath>
|
||||
<Reference Include="CUE.NET, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CUE.NET.1.1.0\lib\net45\CUE.NET.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="DeltaCompressionDotNet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1d14d6e5194e7f4a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.dll</HintPath>
|
||||
@ -888,12 +888,12 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\CUE.NET.1.0.3\build\net45\CUE.NET.targets" Condition="Exists('..\packages\CUE.NET.1.0.3\build\net45\CUE.NET.targets')" />
|
||||
<Import Project="..\packages\CUE.NET.1.1.0\build\net45\CUE.NET.targets" Condition="Exists('..\packages\CUE.NET.1.1.0\build\net45\CUE.NET.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<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\CUE.NET.1.0.3\build\net45\CUE.NET.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CUE.NET.1.0.3\build\net45\CUE.NET.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\CUE.NET.1.1.0\build\net45\CUE.NET.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CUE.NET.1.1.0\build\net45\CUE.NET.targets'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@ -27,7 +27,7 @@ namespace Artemis.DeviceProviders.Corsair
|
||||
Logger.Debug("Attempted to enable Corsair headset. CanUse: {0}", CanUse);
|
||||
|
||||
if (CanUse)
|
||||
CueSDK.HeadsetSDK.UpdateMode = UpdateMode.Manual;
|
||||
CueSDK.UpdateMode = UpdateMode.Manual;
|
||||
|
||||
return CanUse;
|
||||
}
|
||||
|
||||
@ -8,9 +8,9 @@ using Artemis.Properties;
|
||||
using Artemis.Utilities;
|
||||
using CUE.NET;
|
||||
using CUE.NET.Brushes;
|
||||
using CUE.NET.Devices.Generic;
|
||||
using CUE.NET.Devices.Generic.Enums;
|
||||
using CUE.NET.Devices.Keyboard;
|
||||
using CUE.NET.Devices.Keyboard.Keys;
|
||||
using Ninject.Extensions.Logging;
|
||||
using Point = System.Drawing.Point;
|
||||
|
||||
@ -121,23 +121,23 @@ namespace Artemis.DeviceProviders.Corsair
|
||||
|
||||
public override KeyMatch? GetKeyPosition(Keys keyCode)
|
||||
{
|
||||
var widthMultiplier = Width/_keyboard.KeyboardRectangle.Width;
|
||||
var heightMultiplier = Height/_keyboard.KeyboardRectangle.Height;
|
||||
var widthMultiplier = Width/_keyboard.Brush.RenderedRectangle.Width;
|
||||
var heightMultiplier = Height/_keyboard.Brush.RenderedRectangle.Height;
|
||||
|
||||
CorsairKey cueKey = null;
|
||||
CorsairLed cueLed = null;
|
||||
try
|
||||
{
|
||||
cueKey = _keyboard.Keys.FirstOrDefault(k => k.KeyId.ToString() == keyCode.ToString()) ??
|
||||
_keyboard.Keys.FirstOrDefault(k => k.KeyId == KeyMap.FormsKeys[keyCode]);
|
||||
cueLed = _keyboard.Leds.FirstOrDefault(k => k.Id.ToString() == keyCode.ToString()) ??
|
||||
_keyboard.Leds.FirstOrDefault(k => k.Id == KeyMap.FormsKeys[keyCode]);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
|
||||
if (cueKey != null)
|
||||
return new KeyMatch(keyCode, (int) (cueKey.KeyRectangle.X*widthMultiplier),
|
||||
(int) (cueKey.KeyRectangle.Y*heightMultiplier));
|
||||
if (cueLed != null)
|
||||
return new KeyMatch(keyCode, (int) (cueLed.LedRectangle.X*widthMultiplier),
|
||||
(int) (cueLed.LedRectangle.Y*heightMultiplier));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ namespace Artemis.DeviceProviders.Corsair
|
||||
Logger.Debug("Attempted to enable Corsair mice. CanUse: {0}", CanUse);
|
||||
|
||||
if (CanUse)
|
||||
CueSDK.MouseSDK.UpdateMode = UpdateMode.Manual;
|
||||
CueSDK.UpdateMode = UpdateMode.Manual;
|
||||
|
||||
return CanUse;
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ namespace Artemis.DeviceProviders.Corsair
|
||||
Logger.Debug("Attempted to enable Corsair mousemat. CanUse: {0}", CanUse);
|
||||
|
||||
if (CanUse)
|
||||
CueSDK.MousematSDK.UpdateMode = UpdateMode.Manual;
|
||||
CueSDK.UpdateMode = UpdateMode.Manual;
|
||||
|
||||
return CanUse;
|
||||
}
|
||||
@ -68,15 +68,15 @@ namespace Artemis.DeviceProviders.Corsair
|
||||
{
|
||||
// Start at index 1 because the corner belongs to the left side
|
||||
var zoneIndex = ledIndex - 4;
|
||||
col = bitmap.GetPixel((int) (zoneIndex*xStep), 39);
|
||||
col = bitmap.GetPixel((int) (zoneIndex*xStep), bitmap.Height - 1);
|
||||
}
|
||||
// Right side
|
||||
else
|
||||
{
|
||||
var zoneIndex = ledIndex - 10;
|
||||
col = zoneIndex == 4
|
||||
? bitmap.GetPixel(39, 40 - (int) (zoneIndex*yStep))
|
||||
: bitmap.GetPixel(39, 39 - (int) (zoneIndex*yStep));
|
||||
? bitmap.GetPixel(bitmap.Height - 1, bitmap.Height - (int) (zoneIndex*yStep))
|
||||
: bitmap.GetPixel(bitmap.Height - 1, bitmap.Height - 1 - (int) (zoneIndex*yStep));
|
||||
}
|
||||
|
||||
corsairLed.Color = col;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using CUE.NET.Devices.Keyboard.Enums;
|
||||
using CUE.NET.Devices.Generic.Enums;
|
||||
|
||||
namespace Artemis.DeviceProviders.Corsair.Utilities
|
||||
{
|
||||
@ -8,64 +8,64 @@ namespace Artemis.DeviceProviders.Corsair.Utilities
|
||||
{
|
||||
static KeyMap()
|
||||
{
|
||||
FormsKeys = new Dictionary<Keys, CorsairKeyboardKeyId>
|
||||
FormsKeys = new Dictionary<Keys, CorsairLedId>
|
||||
{
|
||||
{Keys.Scroll, CorsairKeyboardKeyId.ScrollLock},
|
||||
{Keys.Pause, CorsairKeyboardKeyId.PauseBreak},
|
||||
{Keys.Back, CorsairKeyboardKeyId.Backspace},
|
||||
{Keys.Oemtilde, CorsairKeyboardKeyId.GraveAccentAndTilde},
|
||||
{Keys.OemMinus, CorsairKeyboardKeyId.MinusAndUnderscore},
|
||||
{Keys.Oemplus, CorsairKeyboardKeyId.EqualsAndPlus},
|
||||
{Keys.OemOpenBrackets, CorsairKeyboardKeyId.BracketLeft},
|
||||
{Keys.Oem6, CorsairKeyboardKeyId.BracketRight},
|
||||
{Keys.Return, CorsairKeyboardKeyId.Enter},
|
||||
{Keys.Next, CorsairKeyboardKeyId.PageDown},
|
||||
{Keys.Capital, CorsairKeyboardKeyId.CapsLock},
|
||||
{Keys.Oem1, CorsairKeyboardKeyId.SemicolonAndColon},
|
||||
{Keys.Oem7, CorsairKeyboardKeyId.ApostropheAndDoubleQuote},
|
||||
{Keys.OemBackslash, CorsairKeyboardKeyId.Backslash},
|
||||
{Keys.LShiftKey, CorsairKeyboardKeyId.LeftShift},
|
||||
{Keys.Oem5, CorsairKeyboardKeyId.NonUsBackslash},
|
||||
{Keys.Oemcomma, CorsairKeyboardKeyId.CommaAndLessThan},
|
||||
{Keys.OemPeriod, CorsairKeyboardKeyId.PeriodAndBiggerThan},
|
||||
{Keys.OemQuestion, CorsairKeyboardKeyId.SlashAndQuestionMark},
|
||||
{Keys.RShiftKey, CorsairKeyboardKeyId.RightShift},
|
||||
{Keys.LControlKey, CorsairKeyboardKeyId.LeftCtrl},
|
||||
{Keys.LWin, CorsairKeyboardKeyId.LeftGui},
|
||||
{Keys.LMenu, CorsairKeyboardKeyId.LeftAlt},
|
||||
{Keys.RMenu, CorsairKeyboardKeyId.RightAlt},
|
||||
{Keys.RWin, CorsairKeyboardKeyId.RightGui},
|
||||
{Keys.Apps, CorsairKeyboardKeyId.Application},
|
||||
{Keys.RControlKey, CorsairKeyboardKeyId.RightCtrl},
|
||||
{Keys.Left, CorsairKeyboardKeyId.LeftArrow},
|
||||
{Keys.Down, CorsairKeyboardKeyId.DownArrow},
|
||||
{Keys.Right, CorsairKeyboardKeyId.RightArrow},
|
||||
{Keys.Up, CorsairKeyboardKeyId.UpArrow},
|
||||
{Keys.NumPad0, CorsairKeyboardKeyId.Keypad0},
|
||||
{Keys.NumPad1, CorsairKeyboardKeyId.Keypad1},
|
||||
{Keys.NumPad2, CorsairKeyboardKeyId.Keypad2},
|
||||
{Keys.NumPad3, CorsairKeyboardKeyId.Keypad3},
|
||||
{Keys.NumPad4, CorsairKeyboardKeyId.Keypad4},
|
||||
{Keys.NumPad5, CorsairKeyboardKeyId.Keypad5},
|
||||
{Keys.NumPad6, CorsairKeyboardKeyId.Keypad6},
|
||||
{Keys.NumPad7, CorsairKeyboardKeyId.Keypad7},
|
||||
{Keys.NumPad8, CorsairKeyboardKeyId.Keypad8},
|
||||
{Keys.NumPad9, CorsairKeyboardKeyId.Keypad9},
|
||||
{Keys.Divide, CorsairKeyboardKeyId.KeypadSlash},
|
||||
{Keys.Multiply, CorsairKeyboardKeyId.KeypadAsterisk},
|
||||
{Keys.Subtract, CorsairKeyboardKeyId.KeypadMinus},
|
||||
{Keys.Add, CorsairKeyboardKeyId.KeypadPlus},
|
||||
{Keys.Decimal, CorsairKeyboardKeyId.KeypadPeriodAndDelete},
|
||||
{Keys.MediaStop, CorsairKeyboardKeyId.Stop},
|
||||
{Keys.MediaPreviousTrack, CorsairKeyboardKeyId.ScanPreviousTrack},
|
||||
{Keys.MediaNextTrack, CorsairKeyboardKeyId.ScanNextTrack},
|
||||
{Keys.MediaPlayPause, CorsairKeyboardKeyId.PlayPause},
|
||||
{Keys.VolumeMute, CorsairKeyboardKeyId.Mute},
|
||||
{Keys.VolumeUp, CorsairKeyboardKeyId.VolumeUp},
|
||||
{Keys.VolumeDown, CorsairKeyboardKeyId.VolumeDown}
|
||||
{Keys.Scroll, CorsairLedId.ScrollLock},
|
||||
{Keys.Pause, CorsairLedId.PauseBreak},
|
||||
{Keys.Back, CorsairLedId.Backspace},
|
||||
{Keys.Oemtilde, CorsairLedId.GraveAccentAndTilde},
|
||||
{Keys.OemMinus, CorsairLedId.MinusAndUnderscore},
|
||||
{Keys.Oemplus, CorsairLedId.EqualsAndPlus},
|
||||
{Keys.OemOpenBrackets, CorsairLedId.BracketLeft},
|
||||
{Keys.Oem6, CorsairLedId.BracketRight},
|
||||
{Keys.Return, CorsairLedId.Enter},
|
||||
{Keys.Next, CorsairLedId.PageDown},
|
||||
{Keys.Capital, CorsairLedId.CapsLock},
|
||||
{Keys.Oem1, CorsairLedId.SemicolonAndColon},
|
||||
{Keys.Oem7, CorsairLedId.ApostropheAndDoubleQuote},
|
||||
{Keys.OemBackslash, CorsairLedId.Backslash},
|
||||
{Keys.LShiftKey, CorsairLedId.LeftShift},
|
||||
{Keys.Oem5, CorsairLedId.NonUsBackslash},
|
||||
{Keys.Oemcomma, CorsairLedId.CommaAndLessThan},
|
||||
{Keys.OemPeriod, CorsairLedId.PeriodAndBiggerThan},
|
||||
{Keys.OemQuestion, CorsairLedId.SlashAndQuestionMark},
|
||||
{Keys.RShiftKey, CorsairLedId.RightShift},
|
||||
{Keys.LControlKey, CorsairLedId.LeftCtrl},
|
||||
{Keys.LWin, CorsairLedId.LeftGui},
|
||||
{Keys.LMenu, CorsairLedId.LeftAlt},
|
||||
{Keys.RMenu, CorsairLedId.RightAlt},
|
||||
{Keys.RWin, CorsairLedId.RightGui},
|
||||
{Keys.Apps, CorsairLedId.Application},
|
||||
{Keys.RControlKey, CorsairLedId.RightCtrl},
|
||||
{Keys.Left, CorsairLedId.LeftArrow},
|
||||
{Keys.Down, CorsairLedId.DownArrow},
|
||||
{Keys.Right, CorsairLedId.RightArrow},
|
||||
{Keys.Up, CorsairLedId.UpArrow},
|
||||
{Keys.NumPad0, CorsairLedId.Keypad0},
|
||||
{Keys.NumPad1, CorsairLedId.Keypad1},
|
||||
{Keys.NumPad2, CorsairLedId.Keypad2},
|
||||
{Keys.NumPad3, CorsairLedId.Keypad3},
|
||||
{Keys.NumPad4, CorsairLedId.Keypad4},
|
||||
{Keys.NumPad5, CorsairLedId.Keypad5},
|
||||
{Keys.NumPad6, CorsairLedId.Keypad6},
|
||||
{Keys.NumPad7, CorsairLedId.Keypad7},
|
||||
{Keys.NumPad8, CorsairLedId.Keypad8},
|
||||
{Keys.NumPad9, CorsairLedId.Keypad9},
|
||||
{Keys.Divide, CorsairLedId.KeypadSlash},
|
||||
{Keys.Multiply, CorsairLedId.KeypadAsterisk},
|
||||
{Keys.Subtract, CorsairLedId.KeypadMinus},
|
||||
{Keys.Add, CorsairLedId.KeypadPlus},
|
||||
{Keys.Decimal, CorsairLedId.KeypadPeriodAndDelete},
|
||||
{Keys.MediaStop, CorsairLedId.Stop},
|
||||
{Keys.MediaPreviousTrack, CorsairLedId.ScanPreviousTrack},
|
||||
{Keys.MediaNextTrack, CorsairLedId.ScanNextTrack},
|
||||
{Keys.MediaPlayPause, CorsairLedId.PlayPause},
|
||||
{Keys.VolumeMute, CorsairLedId.Mute},
|
||||
{Keys.VolumeUp, CorsairLedId.VolumeUp},
|
||||
{Keys.VolumeDown, CorsairLedId.VolumeDown}
|
||||
};
|
||||
}
|
||||
|
||||
public static Dictionary<Keys, CorsairKeyboardKeyId> FormsKeys { get; set; }
|
||||
public static Dictionary<Keys, CorsairLedId> FormsKeys { get; set; }
|
||||
}
|
||||
}
|
||||
@ -28,7 +28,7 @@
|
||||
<Label FontSize="20" HorizontalAlignment="Left">
|
||||
<Label.Content>
|
||||
<AccessText TextWrapping="Wrap"
|
||||
Text="For Azeroth" />
|
||||
Text="Fight The Burning Legion in style with reactive lighting" />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
|
||||
@ -8,8 +8,11 @@ namespace Artemis.Profiles.Layers.Conditions
|
||||
public class DataModelCondition : ILayerCondition
|
||||
{
|
||||
public bool ConditionsMet(LayerModel layer, IDataModel dataModel)
|
||||
{
|
||||
lock (layer.Properties.Conditions)
|
||||
{
|
||||
return layer.Properties.Conditions.All(cm => cm.ConditionMet(dataModel));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -21,7 +21,7 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Left -->
|
||||
<ComboBox x:Name="DataModelProps" Grid.Column="0" Width="210" MaxDropDownHeight="125"
|
||||
<ComboBox x:Name="DataModelProps" Grid.Column="0" Width="210" MaxDropDownHeight="400"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
@ -31,11 +31,11 @@
|
||||
<TextBlock x:Name="Name" Grid.Column="0" Margin="10" FontSize="13.333" VerticalAlignment="Center" Height="18" />
|
||||
|
||||
<!-- Target property -->
|
||||
<ComboBox x:Name="Targets" Grid.Column="1" Margin="10,0" MaxDropDownHeight="125" VerticalAlignment="Center"
|
||||
<ComboBox x:Name="Targets" Grid.Column="1" Margin="10,0" MaxDropDownHeight="300" VerticalAlignment="Center"
|
||||
Height="22">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid MinWidth="435">
|
||||
<Grid MinWidth="482">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
@ -62,7 +62,7 @@
|
||||
|
||||
<!-- PercentageOfProperty -->
|
||||
<StackPanel Grid.Column="3" x:Name="SourcesIsVisible" VerticalAlignment="Center">
|
||||
<ComboBox x:Name="Sources" Margin="10,0" MaxDropDownHeight="125" Height="22"
|
||||
<ComboBox x:Name="Sources" Margin="10,0" MaxDropDownHeight="300" Height="22"
|
||||
IsEnabled="{Binding Path=ControlsEnabled}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<package id="Caliburn.Micro.Core" version="3.0.1" targetFramework="net452" />
|
||||
<package id="Castle.Core" version="3.3.3" targetFramework="net452" />
|
||||
<package id="Colore" version="5.0.0" targetFramework="net461" />
|
||||
<package id="CUE.NET" version="1.0.3" targetFramework="net452" />
|
||||
<package id="CUE.NET" version="1.1.0" targetFramework="net461" />
|
||||
<package id="DeltaCompressionDotNet" version="1.0.0" targetFramework="net461" />
|
||||
<package id="DynamicExpresso.Core" version="1.3.1.0" targetFramework="net452" />
|
||||
<package id="Extended.Wpf.Toolkit" version="2.9" targetFramework="net461" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user