private ClutterFlowBaseActor AddActorToList(AlbumInfo generator, SortedList <AlbumInfo, ClutterFlowBaseActor> list, CoverManager cover_manager) { if (generator == null) { generator = new AlbumInfo(AlbumInfo.UnknownAlbumTitle); } string key = ClutterFlowAlbum.CreateCacheKey(generator); ClutterFlowBaseActor actor = null; if (!Cache.TryGetValue(key, out actor)) { actor = new ClutterFlowAlbum(generator, cover_manager); actor.Hide(); Cache.Add(key, actor); } actor.SortLabel = Comparer.GetSortLabel(generator); list[generator] = actor; actor.Index = list.Count; return(actor); }
public void ScrollTo(AlbumInfo album) { cover_manager.Timeline.Timeout = 500; //give 'm some time to load the song etc. ScrollTo(ClutterFlowAlbum.CreateCacheKey(album)); }