Skip to content

Commit

Permalink
Merge pull request #207 from CoraleStudios/remove-starlight
Browse files Browse the repository at this point in the history
Removed starlight effect
  • Loading branch information
Sharparam authored Nov 10, 2016
2 parents 5728d38 + 90cf67d commit c3af5d6
Show file tree
Hide file tree
Showing 16 changed files with 4 additions and 588 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.

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
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
25 changes: 0 additions & 25 deletions Corale.Colore/Core/IGenericDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,31 +143,6 @@ public interface IGenericDevice : IDevice
[PublicAPI]
void SetSpectrumCycling(int parameter = 0);

/// <summary>
/// Sets a starlight effect on this device.
/// </summary>
/// <param name="effect">Effect options.</param>
[PublicAPI]
void SetStarlight(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>
[PublicAPI]
void SetStarlight(Duration duration, int parameter = 0);

/// <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>
[PublicAPI]
void SetStarlight(Color first, Color second, Duration duration, int parameter = 0);

/// <summary>
/// Sets a static effect on this device.
/// </summary>
Expand Down
7 changes: 0 additions & 7 deletions Corale.Colore/Core/IKeyboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,5 @@ public interface IKeyboard : IDevice
/// <param name="effect">Effect options.</param>
[PublicAPI]
void SetWave(Wave effect);

/// <summary>
/// Sets a starlight effect on the keyboard.
/// </summary>
/// <param name="effect">Effect options.</param>
[PublicAPI]
void SetStarlight(Starlight effect);
}
}
Loading

0 comments on commit c3af5d6

Please sign in to comment.