private static void ClearSelected() { SelectedCountrys.Clear(); SelectedCitys.Clear(); SelectedBitrate.Clear(); SelectedGenres.Clear(); }
private static void FillAllItemsList() { ClearItemsList(); foreach (var s in CounList) { var item = new ListItem { AdditionalProperties = { [NAME] = s } }; item.SetLabel("Name", "[Country." + s + "]"); if (SelectedCountrys.Contains(s)) { item.Selected = true; } Countrys.Add(item); } Refresh(Countrys); foreach (var s in CityList) { var item = new ListItem { AdditionalProperties = { [NAME] = s } }; item.SetLabel("Name", s); if (SelectedCitys.Contains(s)) { item.Selected = true; } Citys.Add(item); } Refresh(Citys); foreach (var s in BitrList) { var item = new ListItem { AdditionalProperties = { [NAME] = Convert.ToInt32(s) + " kbps" } }; item.SetLabel("Name", Convert.ToInt32(s) + " kbps"); if (SelectedBitrate.Contains(Convert.ToInt32(s) + " kbps")) { item.Selected = true; } Bitrate.Add(item); } Refresh(Bitrate); foreach (var s in GenrList) { var item = new ListItem { AdditionalProperties = { [NAME] = s } }; item.SetLabel("Name", s); if (SelectedGenres.Contains(s)) { item.Selected = true; } Genres.Add(item); } Refresh(Genres); }