本文整理汇总了C#中MediaPortal.GUI.Library.GUIControl.SetVisibleCondition方法的典型用法代码示例。如果您正苦于以下问题:C# GUIControl.SetVisibleCondition方法的具体用法?C# GUIControl.SetVisibleCondition怎么用?C# GUIControl.SetVisibleCondition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MediaPortal.GUI.Library.GUIControl
的用法示例。
在下文中一共展示了GUIControl.SetVisibleCondition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateControlWithXmlData
//.........这里部分代码省略.........
}
}
}
}
}
IDictionary<string, MemberInfo> membersThatCanBeUpdated = GetMembersToUpdate(controlType);
List<VisualEffect> animations = new List<VisualEffect>();
List<VisualEffect> thumbAnimations = new List<VisualEffect>();
XmlNodeList childNodes = pControlNode.ChildNodes;
bool hasVisiblecondition = false;
foreach (XmlNode element in childNodes)
{
if (element.Name == "visible")
{
if (element.InnerText != null)
{
hasVisiblecondition = true;
if (element.InnerText != "yes" && element.InnerText != "no")
{
if (element.InnerText.Length != 0)
{
int iVisibleCondition = 0;
bool allowHiddenFocus = false;
//Add parent's visible condition in addition to ours
XmlNode parentNode = pControlNode.ParentNode;
if (IsGroupControl(parentNode))
{
string parentVisiblecondition = GetVisibleConditionXML(parentNode);
if (!string.IsNullOrEmpty(parentVisiblecondition) && parentVisiblecondition != "yes" &&
parentVisiblecondition != "no")
element.InnerText += "+[" + parentVisiblecondition + "]";
}
GetConditionalVisibility(element, control, ref iVisibleCondition, ref allowHiddenFocus);
control.SetVisibleCondition(iVisibleCondition, allowHiddenFocus);
continue;
}
}
}
}
if (element.Name == "animation")
{
VisualEffect effect = new VisualEffect();
if (effect.Create(element))
{
if (effect.AnimationType == AnimationType.VisibleChange)
{
effect.AnimationType = AnimationType.Visible;
//if (effect.IsReversible)
{
VisualEffect effect2 = (VisualEffect)effect.CloneReverse();
effect2.AnimationType = AnimationType.Hidden;
//animations.Add(effect);
animations.Add(effect2);
//continue;
}
}
animations.Add(effect);
continue;
}
}
if (element.Name == "thumbAnimation")
{
VisualEffect effect = new VisualEffect();
if (effect.Create(element))
{
thumbAnimations.Add(effect);