Ejemplo n.º 1
0
    private void CheckForSetUpError(Setting functions, UINode parentNode)
    {
        if (!CanCreate(functions))
        {
            return;
        }

        if (_scheme.IsNull())
        {
            throw new Exception($"No Scheme set in Colour settings for {parentNode}");
        }

        if (_images.Length > 0 && _images[0] is null)
        {
            throw new Exception($"No Image set in Colour settings for {parentNode}");
        }

        if (_images.Length == 0 && !_text)
        {
            throw new Exception($"No Image or Text set in Colour settings for {parentNode}");
        }
    }