Are you sure you want to report the post shown below? This will send an email to the ATVO administrators. Please include a short reason for reporting.
Users reporting for no reason may be locked out.
using System;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
using System.Windows.Media;
namespace Scripts
{
public class OverrideColor : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
var input = item.Theme.ControlInputs.Find("Input1");
var hex = input.Text;
if (string.IsNullOrWhiteSpace(hex))
return Colors.White;
return (Color) ColorConverter.ConvertFromString(hex);
}
}
}