public static void SetTagsCloud(ControlCollection c, string label, TagCloud tagCloud) { if (tagCloud.Items == null || tagCloud.Items.Count == 0) { return; } var ServiceHelper = BookmarkingServiceHelper.GetCurrentInstanse(); var tagsCloudContainer = new SideContainer() { Title = label, ImageURL = WebImageSupplier.GetAbsoluteWebPath("tag_32.png", BookmarkingConst.BookmarkingId) }; tagsCloudContainer.Controls.Add(tagCloud); c.Add(tagsCloudContainer); }
private static TagCloud GetTagsCloud(IList<Tag> tagsCloud) { TagCloud tagCloud = new TagCloud(); var ServiceHelper = BookmarkingServiceHelper.GetCurrentInstanse(); var tags = tagsCloud; foreach (var tag in tags) { TagCloudItem item = new TagCloudItem(); item.TagName = tag.Name; item.Rank = tag.Populatiry; item.URL = ServiceHelper.GetSearchByTagUrl(tag); tagCloud.Items.Add(item); } return tagCloud; }