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 ATVO.ThemesSDK.Data.Entity;
using System.Collections.Generic;
using ATVO.ThemesSDK.Data.Results;
namespace Scripts
{
public class Sc_Pilot_Team : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
if (value == null)
{
return null;
}
IEntitySessionResult result = (IEntitySessionResult) value;
var entity = result.Entity;
var theme = item.Theme;
//find widget I want to show
var widget = theme.Widgets.Find("W_Pilote_Team");
//find widget to check VISIBLE for showing widget
var widget0 = theme.Widgets.Find("W_Pilote_Complet");
// Check if it's a team //I test if widget0.IsVisible == true but it is not OK
if (entity is ITeam)
{
widget.AnimateShow("0");
return null;
}
else
return null;
}
}}