本文整理汇总了C#中MediaPortal.GUI.Library.GUIControl.SetThumbAnimations方法的典型用法代码示例。如果您正苦于以下问题:C# GUIControl.SetThumbAnimations方法的具体用法?C# GUIControl.SetThumbAnimations怎么用?C# GUIControl.SetThumbAnimations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MediaPortal.GUI.Library.GUIControl
的用法示例。
在下文中一共展示了GUIControl.SetThumbAnimations方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateControlWithXmlData
//.........这里部分代码省略.........
}
}
object newValue = null;
if (correspondingMember.MemberType == MemberTypes.Field)
{
newValue = ConvertXmlStringToObject(element.Name, text, ((FieldInfo)correspondingMember).FieldType);
}
else if (correspondingMember.MemberType == MemberTypes.Property)
{
newValue = ConvertXmlStringToObject(element.Name, text, ((PropertyInfo)correspondingMember).PropertyType);
}
try
{
if (correspondingMember.MemberType == MemberTypes.Field)
{
((FieldInfo)correspondingMember).SetValue(control, newValue);
}
else if (correspondingMember.MemberType == MemberTypes.Property)
{
((PropertyInfo)correspondingMember).SetValue(control, newValue, null);
}
}
catch (Exception e)
{
Log.Info("Couldn't place {0}, which is {1} in {2}. Exception:{3}",
newValue, newValue.GetType(), correspondingMember, e);
}
}
else
{
if (char.IsUpper(element.Name[0]))
{
PropertyInfo propertyInfo;
if (element.Name.IndexOf('.') != -1)
{
propertyInfo = controlType.GetProperty(element.Name.Split('.')[1]);
}
else
{
propertyInfo = controlType.GetProperty(element.Name);
}
if (propertyInfo == null)
{
Log.Info("GUIControlFactory.UpdateControlWithXmlData: '{0}' does not contain a definition for '{1}'",
controlType, element.Name);
return;
}
string xml = element.OuterXml;
if (xml.IndexOf("Button.") != -1)
{
xml = xml.Replace("Button.", "GUIControl.");
}
else if (xml.IndexOf("Window.") != -1)
{
xml = xml.Replace("Window.", "GUIWindow.");
}
XamlParser.LoadXml(xml, XmlNodeType.Element, control, filename);
}
}
}
//Set parent control's visible condition as ours wn if we're children of a group
if (!hasVisiblecondition)
{
XmlNode parentNode = pControlNode.ParentNode;
if (IsGroupControl(parentNode))
{
XmlDocument tempDoc = new XmlDocument();
XmlNode elem = tempDoc.CreateElement("visible");
int iVisibleCondition = 0;
bool allowHiddenFocus = true;
string parentVisiblecondition = GetVisibleConditionXML(parentNode);
if (!string.IsNullOrEmpty(parentVisiblecondition) && parentVisiblecondition != "yes" &&
parentVisiblecondition != "no")
{
elem.InnerText = parentVisiblecondition;
XmlNode visibleNode = pControlNode.OwnerDocument.ImportNode(elem, true);
pControlNode.AppendChild(visibleNode);
GetConditionalVisibility(visibleNode, control, ref iVisibleCondition, ref allowHiddenFocus);
control.SetVisibleCondition(iVisibleCondition, allowHiddenFocus);
}
}
}
if (animations.Count > 0)
{
control.SetAnimations(animations);
}
if (thumbAnimations.Count > 0)
{
control.SetThumbAnimations(thumbAnimations);
}
}