本文整理汇总了C#中System.VideoInfo.GetExtendedProperties方法的典型用法代码示例。如果您正苦于以下问题:C# VideoInfo.GetExtendedProperties方法的具体用法?C# VideoInfo.GetExtendedProperties怎么用?C# VideoInfo.GetExtendedProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.VideoInfo
的用法示例。
在下文中一共展示了VideoInfo.GetExtendedProperties方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetGuiProperties_ExtendedVideoInfo
/// <summary>
/// Processes extended properties which might be available
/// if the VideoInfo.Other object is using the IVideoDetails interface
/// </summary>
/// <param name="videoInfo">if this param is null, the <see cref="selectedVideo"/> will be used</param>
private void SetGuiProperties_ExtendedVideoInfo(VideoInfo videoInfo, bool DetailsItem)
{
string prefix = "#OnlineVideos.";
if (!DetailsItem)
{
ResetExtendedGuiProperties(prefix); // remove everything
if (videoInfo == null) videoInfo = selectedVideo; // set everything for the selected video in the next step if given video is null
prefix = prefix + "Details.";
}
else
{
prefix = prefix + "DetailsItem.";
ResetExtendedGuiProperties(prefix); // remove all entries for the last selected "DetailsItem" (will be set for the parameter in the next step)
}
if (videoInfo != null)
{
var custom = videoInfo.GetExtendedProperties();
if (custom != null)
{
foreach (string property in custom.Keys)
{
string label = prefix + property;
string value = custom[property];
SetExtendedGuiProperty(label, value);
}
}
}
}