mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2025-12-13 00:58:31 +00:00
Refactored to fit the project coding style
This commit is contained in:
parent
54231ec4e8
commit
02aaf24c41
@ -63,6 +63,8 @@
|
|||||||
<Compile Include="Devices\Generic\Enums\CorsairAccessMode.cs" />
|
<Compile Include="Devices\Generic\Enums\CorsairAccessMode.cs" />
|
||||||
<Compile Include="Devices\Generic\Enums\CorsairDeviceCaps.cs" />
|
<Compile Include="Devices\Generic\Enums\CorsairDeviceCaps.cs" />
|
||||||
<Compile Include="Devices\Generic\Enums\CorsairDeviceType.cs" />
|
<Compile Include="Devices\Generic\Enums\CorsairDeviceType.cs" />
|
||||||
|
<Compile Include="Devices\Keyboard\ColorBrushes\IBrush.cs" />
|
||||||
|
<Compile Include="Devices\Keyboard\ColorBrushes\SolidColorBrush.cs" />
|
||||||
<Compile Include="Devices\Keyboard\Enums\CorsairLogicalKeyboardLayout.cs" />
|
<Compile Include="Devices\Keyboard\Enums\CorsairLogicalKeyboardLayout.cs" />
|
||||||
<Compile Include="Devices\Headset\Enums\CorsairHeadsetLedId.cs" />
|
<Compile Include="Devices\Headset\Enums\CorsairHeadsetLedId.cs" />
|
||||||
<Compile Include="Devices\Keyboard\Enums\CorsairKeyboardKeyId.cs" />
|
<Compile Include="Devices\Keyboard\Enums\CorsairKeyboardKeyId.cs" />
|
||||||
|
|||||||
@ -1,10 +1,9 @@
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
|
||||||
namespace CUE.NET.Devices.Keyboard.ColorBrushes
|
namespace CUE.NET.Devices.Keyboard.ColorBrushes
|
||||||
|
|
||||||
{
|
{
|
||||||
public interface IBrush
|
public interface IBrush
|
||||||
{
|
{
|
||||||
Color getColorAtPoint(Point point);
|
Color GetColorAtPoint(Point point);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4,33 +4,26 @@ namespace CUE.NET.Devices.Keyboard.ColorBrushes
|
|||||||
{
|
{
|
||||||
public class SolidColorBrush : IBrush
|
public class SolidColorBrush : IBrush
|
||||||
{
|
{
|
||||||
Color color;
|
#region Properties & Fields
|
||||||
|
|
||||||
|
public Color Color { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|
||||||
public SolidColorBrush(Color color)
|
public SolidColorBrush(Color color)
|
||||||
{
|
{
|
||||||
this.color = color;
|
this.Color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Methods
|
#region Methods
|
||||||
|
|
||||||
public Color getColorAtPoint(Point point)
|
public Color GetColorAtPoint(Point point)
|
||||||
{
|
{
|
||||||
/* a solid color brush returns the same color no matter the point */
|
return Color; // A solid color brush returns the same color no matter the point
|
||||||
return this.color;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Color getColor()
|
|
||||||
{
|
|
||||||
return this.color;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setColor(Color color)
|
|
||||||
{
|
|
||||||
this.color = color;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user