private void OnSelectedFilterCategoryChanged(FilterCategoryId categoryName) { Pici.Log.info(typeof(FilterChooserViewModel), string.Format("selected filter category {0}", Chooser.SelectedFilterCategory)); var category = HBS.Search.FilterList.FirstOrDefault(fc => fc.Id == categoryName); if (category != null) { if (category.Id == FilterCategoryId.date) { Filter = new DateFilterVM(category); //Filter = new ListFilterViewModel(category); } else if (category.Id == FilterCategoryId.available) { Filter = new AvailableFilterViewModel(category); FiltersApplied(this, Filter.SelectedFilter); } else { Filter = new ListFilterViewModel(category); } } else { if (categoryName == FilterCategoryId.digital) { Filter = new DigitalFilterVM(); FiltersApplied(this, Filter.SelectedFilter); } } }
public static string GetName(FilterCategoryId category, string valueId) { FilterDictionaryEntry dict; if (DICT.TryGetValue(category, out dict)) { string res; if (dict.Values != null && dict.Values.TryGetValue(valueId, out res)) { return(res); } } return(valueId); }
protected virtual void OnCategoryNameEnumChanged(FilterCategoryId category) { Name = Pici.Resources.Find(category.ToString()); }
public ChooserButtonViewModel(FilterCategoryId filterCategory, ViewStyle style) { CategoryName = filterCategory; Init(style); }