From 02aaf24c41c9b7bd2a40b887aa2c60db60a516e7 Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Tue, 22 Sep 2015 20:27:04 +0200 Subject: [PATCH] Refactored to fit the project coding style --- CUE.NET.csproj | 2 ++ Devices/Keyboard/ColorBrushes/IBrush.cs | 3 +-- .../Keyboard/ColorBrushes/SolidColorBrush.cs | 23 +++++++------------ 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/CUE.NET.csproj b/CUE.NET.csproj index 316c99b..57fee7a 100644 --- a/CUE.NET.csproj +++ b/CUE.NET.csproj @@ -63,6 +63,8 @@ + + diff --git a/Devices/Keyboard/ColorBrushes/IBrush.cs b/Devices/Keyboard/ColorBrushes/IBrush.cs index 594ad08..f89ab4d 100644 --- a/Devices/Keyboard/ColorBrushes/IBrush.cs +++ b/Devices/Keyboard/ColorBrushes/IBrush.cs @@ -1,10 +1,9 @@ using System.Drawing; namespace CUE.NET.Devices.Keyboard.ColorBrushes - { public interface IBrush { - Color getColorAtPoint(Point point); + Color GetColorAtPoint(Point point); } } \ No newline at end of file diff --git a/Devices/Keyboard/ColorBrushes/SolidColorBrush.cs b/Devices/Keyboard/ColorBrushes/SolidColorBrush.cs index 21d0b68..963dcca 100644 --- a/Devices/Keyboard/ColorBrushes/SolidColorBrush.cs +++ b/Devices/Keyboard/ColorBrushes/SolidColorBrush.cs @@ -4,33 +4,26 @@ namespace CUE.NET.Devices.Keyboard.ColorBrushes { public class SolidColorBrush : IBrush { - Color color; + #region Properties & Fields + + public Color Color { get; set; } + + #endregion #region Constructors public SolidColorBrush(Color color) { - this.color = color; + this.Color = color; } #endregion #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 this.color; - } - - public Color getColor() - { - return this.color; - } - - public void setColor(Color color) - { - this.color = color; + return Color; // A solid color brush returns the same color no matter the point } #endregion