Skip to content

Commit

Permalink
Merge pull request #211 from CoraleStudios/develop
Browse files Browse the repository at this point in the history
[RELEASE] v5.1
  • Loading branch information
Sharparam authored Dec 2, 2016
2 parents af61ee7 + c3af5d6 commit 1526642
Show file tree
Hide file tree
Showing 27 changed files with 184 additions and 613 deletions.
10 changes: 0 additions & 10 deletions Corale.Colore.Tester/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,6 @@
ItemsSource="{Binding WaveDirectionValues}"
SelectedItem="{Binding SelectedWaveDirection, Mode=TwoWay}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,6,0,0" HorizontalAlignment="Center">
<Button x:Name="SetStarlightButton" Content="SetStarlight" VerticalAlignment="Top" Width="75"
Command="{Binding StarlightCommand, Mode=OneWay}" />
<ComboBox Height="22" Margin="8,0,0,0" Width="98"
ItemsSource="{Binding StarlightTypeValues}"
SelectedItem="{Binding SelectedStarlightType, Mode=TwoWay}" />
<ComboBox Height="22" Margin="8,0,0,0" Width="98"
ItemsSource="{Binding StarlightDurationValues}"
SelectedItem="{Binding SelectedStarlightDuration, Mode=TwoWay}" />
</StackPanel>
<Button x:Name="SetKeyboarsStaticButton" Content="SetStatic" VerticalAlignment="Top" Width="75"
Margin="84,6,84,0" Command="{Binding StaticCommand, Mode=OneWay}" />
<Button x:Name="ClearButton" Content="Clear" VerticalAlignment="Top" Width="75"
Expand Down
58 changes: 0 additions & 58 deletions Corale.Colore.Tester/ViewModels/KeyboardViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,11 @@ public class KeyboardViewModel : INotifyPropertyChanged
private Duration _selectedReactiveDuration;
private Direction _selectedWaveDirection;

private StarlightType _selectedStarlightType;

private Duration _selectedStarlightDuration;

public KeyboardViewModel()
{
SelectedKey = Key.A;
SelectedReactiveDuration = Duration.Long;
SelectedWaveDirection = Direction.LeftToRight;
SelectedStarlightType = StarlightType.Two;
SelectedStarlightDuration = Duration.Long;
ColorOne.Color = Core.Color.Red.ToWpfColor();
ColorTwo.Color = Core.Color.Blue.ToWpfColor();
}
Expand Down Expand Up @@ -118,34 +112,6 @@ public Direction SelectedWaveDirection
}
}

public StarlightType SelectedStarlightType
{
get
{
return _selectedStarlightType;
}

set
{
_selectedStarlightType = value;
OnPropertyChanged(nameof(SelectedStarlightType));
}
}

public Duration SelectedStarlightDuration
{
get
{
return _selectedStarlightDuration;
}

set
{
_selectedStarlightDuration = value;
OnPropertyChanged(nameof(SelectedStarlightDuration));
}
}

public ICommand AllCommand
=> new DelegateCommand(() => Core.Keyboard.Instance.SetAll(ColorOne.Color.ToColoreColor()));

Expand All @@ -164,8 +130,6 @@ public ICommand ReactiveCommand
public ICommand WaveCommand
=> new DelegateCommand(SetWaveEffect);

public ICommand StarlightCommand => new DelegateCommand(SetStarlightEffect);

public ICommand StaticCommand
=> new DelegateCommand(() => Core.Keyboard.Instance.SetStatic(new Static(ColorOne.Color.ToColoreColor())));

Expand All @@ -181,11 +145,6 @@ public IEnumerable<Key> KeyValues

public IEnumerable<Direction> WaveDirectionValues => Enum.GetValues(typeof(Direction)).Cast<Direction>();

public IEnumerable<StarlightType> StarlightTypeValues
=> Enum.GetValues(typeof(StarlightType)).Cast<StarlightType>();

public IEnumerable<Duration> StarlightDurationValues => Enum.GetValues(typeof(Duration)).Cast<Duration>();

public IEnumerable<Duration> ReactiveDurationValues => Enum.GetValues(typeof(Duration)).Cast<Duration>();

protected virtual void OnPropertyChanged(string propertyName)
Expand Down Expand Up @@ -217,23 +176,6 @@ private void SetWaveEffect()
}
}

private void SetStarlightEffect()
{
try
{
Core.Keyboard.Instance.SetStarlight(
new Starlight(
SelectedStarlightType,
ColorOne.Color.ToColoreColor(),
ColorTwo.Color.ToColoreColor(),
SelectedStarlightDuration));
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}

private void SetKeyColor()
{
try
Expand Down
2 changes: 0 additions & 2 deletions Corale.Colore.Tests/Corale.Colore.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,13 @@
<Compile Include="Razer\Effects\NoneTests.cs" />
<Compile Include="Razer\Effects\ReactiveTests.cs" />
<Compile Include="Razer\Effects\SpectrumCyclingTests.cs" />
<Compile Include="Razer\Effects\StarlightTests.cs" />
<Compile Include="Razer\Effects\StaticTests.cs" />
<Compile Include="Razer\Effects\WaveTests.cs" />
<Compile Include="Razer\Headset\Effects\BreathingTests.cs" />
<Compile Include="Razer\Headset\Effects\StaticTests.cs" />
<Compile Include="Razer\Keyboard\Effects\BreathingTests.cs" />
<Compile Include="Razer\Keyboard\Effects\CustomTests.cs" />
<Compile Include="Razer\Keyboard\Effects\ReactiveTests.cs" />
<Compile Include="Razer\Keyboard\Effects\StarlightTests.cs" />
<Compile Include="Razer\Keyboard\Effects\StaticTests.cs" />
<Compile Include="Razer\Keyboard\Effects\WaveTests.cs" />
<Compile Include="Razer\Keypad\Effects\BreathingTests.cs" />
Expand Down
86 changes: 0 additions & 86 deletions Corale.Colore.Tests/Razer/Effects/StarlightTests.cs

This file was deleted.

68 changes: 0 additions & 68 deletions Corale.Colore.Tests/Razer/Keyboard/Effects/StarlightTests.cs

This file was deleted.

2 changes: 1 addition & 1 deletion Corale.Colore.WinForms/Corale.Colore.WinForms.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<copyright>Copyright (c) 2016 by Adam Hellberg and Brandon Scott.</copyright>
<tags>Razer Chroma Corale WinForms Colore</tags>
<dependencies>
<dependency id="Colore" />
<dependency id="Colore" version="COLORE_VERSION" />
</dependencies>
</metadata>
</package>
2 changes: 1 addition & 1 deletion Corale.Colore.Wpf/Corale.Colore.Wpf.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<copyright>Copyright (c) 2016 by Adam Hellberg and Brandon Scott.</copyright>
<tags>Razer Chroma Corale WPF Colore</tags>
<dependencies>
<dependency id="Colore" />
<dependency id="Colore" version="COLORE_VERSION" />
</dependencies>
</metadata>
</package>
4 changes: 0 additions & 4 deletions Corale.Colore/Corale.Colore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@
<Compile Include="Razer\Effects\None.cs" />
<Compile Include="Razer\Effects\Reactive.cs" />
<Compile Include="Razer\Effects\SpectrumCycling.cs" />
<Compile Include="Razer\Effects\Starlight.cs" />
<Compile Include="Razer\Effects\StarlightType.cs" />
<Compile Include="Razer\Effects\Static.cs" />
<Compile Include="Razer\Effects\Wave.cs" />
<Compile Include="Razer\Headset\Effects\Breathing.cs" />
Expand All @@ -157,8 +155,6 @@
<Compile Include="Razer\Keyboard\Effects\Duration.cs" />
<Compile Include="Razer\Keyboard\Effects\Effect.cs" />
<Compile Include="Razer\Keyboard\Effects\Reactive.cs" />
<Compile Include="Razer\Keyboard\Effects\Starlight.cs" />
<Compile Include="Razer\Keyboard\Effects\StarlightType.cs" />
<Compile Include="Razer\Keyboard\Effects\Static.cs" />
<Compile Include="Razer\Keyboard\Effects\Wave.cs" />
<Compile Include="Razer\Keyboard\Key.cs" />
Expand Down
7 changes: 6 additions & 1 deletion Corale.Colore/Core/Chroma.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -75,6 +74,7 @@ public sealed class Chroma : IChroma
/// </summary>
private Chroma()
{
Version = typeof(Chroma).Assembly.GetName().Version;
Initialize();
}

Expand Down Expand Up @@ -181,6 +181,11 @@ public static IChroma Instance
/// </summary>
public SdkVersion SdkVersion => _sdkVersion;

/// <summary>
/// Gets the <see cref="System.Version" /> of Colore.
/// </summary>
public Version Version { get; }

/// <summary>
/// Initializes the SDK if it hasn't already.
/// </summary>
Expand Down
31 changes: 0 additions & 31 deletions Corale.Colore/Core/GenericDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,37 +228,6 @@ public void SetSpectrumCycling(int parameter = 0)
SetSpectrumCycling(new SpectrumCycling(parameter));
}

/// <summary>
/// Sets a starlight effect on this device.
/// </summary>
/// <param name="effect">Effect options.</param>
public void SetStarlight(Starlight effect)
{
SetGuid(NativeWrapper.CreateDeviceEffect(DeviceId, Effect.Starlight, effect));
}

/// <summary>
/// Sets a starlight effect on this device, using random colors.
/// </summary>
/// <param name="duration">Duration of the effect.</param>
/// <param name="parameter">Additional effect parameter.</param>
public void SetStarlight(Duration duration, int parameter = 0)
{
SetStarlight(new Starlight(duration, parameter));
}

/// <summary>
/// Sets a starlight effect on this device, using specified colors.
/// </summary>
/// <param name="first">The first color to use.</param>
/// <param name="second">The second color to use.</param>
/// <param name="duration">Duration of the effect.</param>
/// <param name="parameter">Additional effect parameter.</param>
public void SetStarlight(Color first, Color second, Duration duration, int parameter = 0)
{
SetStarlight(new Starlight(duration, first, second, parameter));
}

/// <summary>
/// Sets a static effect on this device.
/// </summary>
Expand Down
Loading

0 comments on commit 1526642

Please sign in to comment.