2using System.Collections.Generic;
20 private static readonly Dictionary<string, ThemeDefinition> definitionsPerDomain =
new Dictionary<string, ThemeDefinition>(StringComparer.InvariantCultureIgnoreCase);
51 if (!
string.IsNullOrEmpty(Host))
78 if (!
string.IsNullOrEmpty(Host))
90 get => currentDefinition;
91 internal set => currentDefinition = value;
101 lock (definitionsPerDomain)
107 return currentDefinition;
117 lock (definitionsPerDomain)
123 private static string ColorToString(SKColor Color)
125 StringBuilder sb =
new StringBuilder();
128 sb.Append(Color.Red.ToString(
"X2"));
129 sb.Append(Color.Green.ToString(
"X2"));
130 sb.Append(Color.Blue.ToString(
"X2"));
132 if (Color.Alpha != 255)
133 sb.Append(Color.Alpha.ToString(
"X2"));
135 return sb.ToString();
Domain constant, contains the value of the gateway domain.
string ConstantName
Name of the constant
IElement GetValueElement(Variables Variables)
Gets the constant value element.
static ThemeDefinition CurrentTheme
Current theme.
static ThemeDefinition GetCurrentTheme(Variables Variables)
Gets the current theme definition, based on the host information available in the session varaibles.
static ThemeDefinition GetTheme(string Domain)
Gets the theme for a given domain.
string[] Aliases
Optional aliases. If there are no aliases for the constant, null is returned.
Contains properties for a theme.
SKColor GraphFgColor
Graph foreground color.
SKColor GraphBgColor
Graph background color.
const string GraphFgColorVariableName
Variable name for graph foreground color.
const string GraphBgColorVariableName
Variable name for graph background color.
Contains information about a variable.
virtual bool TryGetVariable(string Name, out Variable Variable)
Tries to get a variable object, given its name.
Interface for objects that contain a reference to a host.
Basic interface for all types of elements.
Base interface for constants that integrate into the script engine.