From a74a77ae9ef20b9bcfeec89ca25c88ab43cc4187 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Sat, 13 Feb 2021 12:57:09 -0500 Subject: [PATCH] * QColor.cs: Add "none" color * QDefines.cs: Add Color and Connection Statice strings --- QControlKit/Constants/QColor.cs | 50 ++++++++++++++++++++----------- QControlKit/Constants/QDefines.cs | 18 +++++++++++ 2 files changed, 51 insertions(+), 17 deletions(-) diff --git a/QControlKit/Constants/QColor.cs b/QControlKit/Constants/QColor.cs index 53f4ef3..43754d8 100644 --- a/QControlKit/Constants/QColor.cs +++ b/QControlKit/Constants/QColor.cs @@ -3,40 +3,43 @@ public class QColor { public string name { get; set; } - public string Hex { get; set; } public string lightHex { get; set; } public string darkHex { get; set; } + public QColor() { - defaultColor(); + noneColor(); } public QColor(string name) { switch (name) { - case "red": + case QColorName.Red: redColor(); break; - case "orange": + case QColorName.Orange: orangeColor(); break; - case "yellow": + case QColorName.Yellow: yellowColor(); break; - case "green": + case QColorName.Green: greenColor(); break; - case "blue": + case QColorName.Blue: blueColor(); break; - case "indigo": + case QColorName.Indigo: indigoColor(); break; - case "purple": + case QColorName.Purple: purpleColor(); break; + case QColorName.None: + noneColor(); + break; default: defaultColor(); break; @@ -45,7 +48,15 @@ private void defaultColor() { - name = "default"; + name = QColorName.Default; + lightHex = "#ACAAB2"; + Hex = "#8F8A99"; + darkHex = "#77737F"; + } + + private void noneColor() + { + name = QColorName.None; lightHex = "#ACAAB2"; Hex = "#8F8A99"; darkHex = "#77737F"; @@ -53,28 +64,31 @@ private void redColor() { - name = "red"; + name = QColorName.Red; lightHex = "#FC563C"; Hex = "#FC363B"; darkHex = "#E31C24"; } + private void orangeColor() { - name = "orange"; + name = QColorName.Orange; lightHex = "#FFAA00"; Hex = "#FF9500"; darkHex = "#FF6A00"; } + private void yellowColor () { - name = "yellow"; + name = QColorName.Yellow; lightHex = "#FFF480"; Hex = "#F7E519"; darkHex = "#FFD500"; } + private void greenColor() { - name = "green"; + name = QColorName.Green; lightHex = "#17E639"; Hex = "#00CC22"; darkHex = "#00B300"; @@ -82,21 +96,23 @@ private void blueColor() { - name = "blue"; + name = QColorName.Blue; lightHex = "#5C73E6"; Hex = "#415AD9"; darkHex = "#2944CC"; } + private void indigoColor() { - name = "purple"; + name = QColorName.Purple; lightHex = "#3F388C"; Hex = "#5A5499"; darkHex = "#6262B3"; } + private void purpleColor() { - name = "purple"; + name = QColorName.Purple; lightHex = "#B500D9"; Hex = "#9500B3"; darkHex = "#730099"; diff --git a/QControlKit/Constants/QDefines.cs b/QControlKit/Constants/QDefines.cs index 107e4f7..b9c95ff 100644 --- a/QControlKit/Constants/QDefines.cs +++ b/QControlKit/Constants/QDefines.cs @@ -124,6 +124,24 @@ public const string RootCueUpdate = "[root group of cue lists]"; } + public static class QConnectionStatus { + public const string BadPass = "badpass"; + public const string Ok = "ok"; + public const string Error = "error"; + } + + public static class QColorName + { + public const string Red = "red"; + public const string Orange = "orange"; + public const string Yellow = "yellow"; + public const string Green = "green"; + public const string Blue = "blue"; + public const string Indigo = "indigo"; + public const string Purple = "purple"; + public const string None = "none"; + public const string Default = "default"; //is this even an option? + } enum QFadeMode {