public void LoadContent(FeaturedInfo featuredInfo) { this.loopScroll.Init((!SafeLayout.IsTablet) ? this.phoneConfig : this.tabletConfig); this.visabilityEventTracker.SetDelegate((int index) => this.items[index]); for (int i = 0; i < featuredInfo.orderedList.Count; i++) { OrderedItemType itemType = featuredInfo.orderedList[i].itemType; if (itemType != OrderedItemType.PromoPic) { if (itemType != OrderedItemType.Daily) { if (itemType == OrderedItemType.ExternalLink) { ExternalLinkInfo externalLinkInfo = (ExternalLinkInfo)featuredInfo.orderedList[i]; this.AddExternalLinkItem(externalLinkInfo); } } else { DailyPicInfo dailyPicInfo = (DailyPicInfo)featuredInfo.orderedList[i]; this.AddDailyItem(dailyPicInfo); } } else { PromoPicInfo promoPicInfo = (PromoPicInfo)featuredInfo.orderedList[i]; this.AddEditorItem(promoPicInfo); } } this.loopScroll.PrepareLayout(); }
public void LoadContent(FeaturedInfo featuredInfo) { this.Init(); for (int i = 0; i < featuredInfo.orderedList.Count; i++) { OrderedItemType itemType = featuredInfo.orderedList[i].itemType; if (itemType != OrderedItemType.PromoPic) { if (itemType != OrderedItemType.Daily) { if (itemType == OrderedItemType.ExternalLink) { ExternalLinkInfo externalLinkInfo = (ExternalLinkInfo)featuredInfo.orderedList[i]; this.AddExternalLinkItem(externalLinkInfo); } } else { DailyPicInfo dailyPicInfo = (DailyPicInfo)featuredInfo.orderedList[i]; this.AddDailyItem(dailyPicInfo); } } else { PromoPicInfo promoPicInfo = (PromoPicInfo)featuredInfo.orderedList[i]; this.AddEditorItem(promoPicInfo); } } this.loopScroll.PrepareLayout(); }
public PageContentInfo(List <PictureData> pics, FeaturedInfo featured, NewsInfo news, List <CategoryInfo> categoryInfos, UpdateDialog updateDialog, BonusCategoryConfig bonusCategoryConfig) { this.Pics = pics; this.Featured = featured; this.CategoryInfos = categoryInfos; this.UpdateDialog = updateDialog; this.BonusCategoryConfig = bonusCategoryConfig; this.News = news; }