/// <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); } } } }