public void SelectedQuick(ListItem item) { Func <MyStream, bool> predicate = (Func <MyStream, bool>)item.AdditionalProperties[KEY_FILTER]; var filtered = WebradioHome.StreamList.Where(predicate).ToList(); WebradioHome.FillItemList(filtered); }
public void FillList(List <MyStream> list) { if (list.Count > 0) { WebradioHome.FillItemList(list); ServiceRegistration.Get <IScreenManager>().CloseTopmostDialog(); } else { InfoLabel = NO_STREAMS; } }
/// <summary> /// Import selected Filter /// </summary> public void SelectFavorite(ListItem item) { var list = new List <MyStream>(); foreach (var query in from f in FavoritList where f.Titel == (string)item.AdditionalProperties[NAME] select(from r in WebradioHome.StreamList where _contains(f.StreamUrls, r.StreamUrls[0].StreamUrl) select r)) { foreach (MyStream ms in query.Where(ms => !list.Contains(ms))) { list.Add(ms); } break; } WebradioHome.FillItemList(list); ServiceRegistration.Get <IScreenManager>().CloseTopmostDialog(); }
public void SelectedFilter(ListItem item) { List <MyStream> list = new List <MyStream>(); foreach (IEnumerable <MyStream> query in from f in FilterList where f.Titel == (string)item.AdditionalProperties[KEY_FILTER] select(from r in WebradioHome.StreamList where Contains(f.Countrys, r.Country) && Contains(f.Citys, r.City) && Contains2(f.Genres, r.Genres) && Contains(f.Bitrate, r.StreamUrls[0].Bitrate) select r)) { foreach (MyStream ms in query.Where(ms => !list.Contains(ms))) { list.Add(ms); } break; } WebradioHome.FillItemList(list); }