mirror of
https://github.com/jwetzell/QControlKit.git
synced 2026-08-08 08:53:50 +00:00
Add QColor with hex values instead of color objects for compatibility
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
|
||||
namespace QSharp
|
||||
{
|
||||
class QColor
|
||||
{
|
||||
public string name;
|
||||
|
||||
public string Hex;
|
||||
public string lightHex;
|
||||
public string darkHex;
|
||||
|
||||
public QColor(string name)
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case "red":
|
||||
redColor();
|
||||
break;
|
||||
case "orange":
|
||||
orangeColor();
|
||||
break;
|
||||
case "yellow":
|
||||
yellowColor();
|
||||
break;
|
||||
case "green":
|
||||
greenColor();
|
||||
break;
|
||||
case "blue":
|
||||
blueColor();
|
||||
break;
|
||||
case "indigo":
|
||||
indigoColor();
|
||||
break;
|
||||
case "purple":
|
||||
purpleColor();
|
||||
break;
|
||||
default:
|
||||
defaultColor();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void defaultColor()
|
||||
{
|
||||
name = "default";
|
||||
lightHex = "ACAAB2";
|
||||
Hex = "8F8A99";
|
||||
darkHex = "77737F";
|
||||
}
|
||||
|
||||
private void redColor()
|
||||
{
|
||||
name = "red";
|
||||
lightHex = "FC563C";
|
||||
Hex = "FC363B";
|
||||
darkHex = "E31C24";
|
||||
}
|
||||
private void orangeColor()
|
||||
{
|
||||
name = "orange";
|
||||
lightHex = "FFAA00";
|
||||
Hex = "FF9500";
|
||||
darkHex = "FF6A00";
|
||||
}
|
||||
private void yellowColor ()
|
||||
{
|
||||
name = "yellow";
|
||||
lightHex = "FFF480";
|
||||
Hex = "F7E519";
|
||||
darkHex = "FFD500";
|
||||
}
|
||||
private void greenColor()
|
||||
{
|
||||
name = "green";
|
||||
lightHex = "17E639";
|
||||
Hex = "00CC22";
|
||||
darkHex = "00B300";
|
||||
}
|
||||
|
||||
private void blueColor()
|
||||
{
|
||||
name = "blue";
|
||||
lightHex = "5C73E6";
|
||||
Hex = "415AD9";
|
||||
darkHex = "2944CC";
|
||||
}
|
||||
private void indigoColor()
|
||||
{
|
||||
name = "purple";
|
||||
lightHex = "3F388C";
|
||||
Hex = "5A5499";
|
||||
darkHex = "6262B3";
|
||||
}
|
||||
private void purpleColor()
|
||||
{
|
||||
name = "purple";
|
||||
lightHex = "B500D9";
|
||||
Hex = "9500B3";
|
||||
darkHex = "730099";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+1
-9
@@ -37,7 +37,6 @@ namespace QSharp
|
||||
|
||||
public bool IsUpdate { get{ return OSCMessage.Address.StartsWith("/update"); } }
|
||||
|
||||
|
||||
public bool IsWorkspaceUpdate {
|
||||
get {
|
||||
// /update/workspace/{workspace_id}
|
||||
@@ -54,7 +53,6 @@ namespace QSharp
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IsWorkspaceSettingsUpdate {
|
||||
get {
|
||||
// /update/workspace/{workspace_id}/settings/{settings_controller}
|
||||
@@ -63,7 +61,6 @@ namespace QSharp
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IsLightDashboardUpdate {
|
||||
get {
|
||||
// /update/workspace/{workspace_id}/dashboard
|
||||
@@ -72,7 +69,6 @@ namespace QSharp
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IsCueUpdate {
|
||||
get {
|
||||
// /update/workspace/{workspace_id}/cue_id/{cue_id}
|
||||
@@ -81,7 +77,6 @@ namespace QSharp
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IsPlaybackPositionUpdate {
|
||||
get {
|
||||
// /update/workspace/{workspace_id}/cueList/{cue_list_id}/playbackPosition {cue_id}
|
||||
@@ -90,7 +85,6 @@ namespace QSharp
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IsPreferencesUpdate {
|
||||
get {
|
||||
string[] parts = AddressParts;
|
||||
@@ -115,6 +109,7 @@ namespace QSharp
|
||||
}
|
||||
#endregion
|
||||
|
||||
//host method
|
||||
|
||||
public string address { get { return OSCMessage.Address; } }
|
||||
|
||||
@@ -136,8 +131,6 @@ namespace QSharp
|
||||
get
|
||||
{
|
||||
JObject responseObj = JObject.Parse((string)arguments[0]);
|
||||
|
||||
//TODO
|
||||
return responseObj["data"];
|
||||
}
|
||||
}
|
||||
@@ -166,6 +159,5 @@ namespace QSharp
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,6 @@
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Terminal.Gui" Version="0.81.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\QSharp\QSharp.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user