Created
March 30, 2013 09:12
-
-
Save samilamti/5276037 to your computer and use it in GitHub Desktop.
Shared UIDefinitions class that needs to be implemented per platform to create the platform's native color object given RGB-values.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace NinjaLocator.Core | |
{ | |
public abstract class UIDefinitions<TNativeColor> | |
{ | |
protected abstract TNativeColor TranslateColor(byte red, byte green, byte blue); | |
private static UIDefinitions<TNativeColor> _instance; | |
public static TNativeColor BackgroundColor { get { return _instance.TranslateColor(Configuration.BG_RED, Configuration.BG_GREEN, Configuration.BG_BLUE); } } | |
public static TNativeColor ForegroundColor { get { return _instance.TranslateColor(Configuration.FG_RED, Configuration.FG_GREEN, Configuration.FG_BLUE); } } | |
protected UIDefinitions() | |
{ | |
_instance = this; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment