Report post

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.


Post

Posted by Scott P
on
Thanks for the suggestion, Nick! Yes, I think the script is the issue. I only have 1 script in my whole theme. I just deleted it to test, it it seems to work flawless now.
I would like to know where the error might be, but I'm not good with this programming at all. Here is the script below. It pulls a hex color code from a spreadsheet I have loaded. I use this for various backgrounds, identifying the driver's home color. Hope this makes sense, and hope it's an easy fix?
Thanks a bunch, Nick!

using System;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
using System.Windows.Media;

namespace Scripts
{
public class HexConvert : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
var colorString = value?.ToString();
if (string.IsNullOrWhiteSpace(colorString))
return Color.FromRgb(153,0,0);

return (Color)ColorConverter.ConvertFromString(colorString);
}
}
}