Exemple #1
0
 public FilmFiltersSet()
 {
     this[GENRES_FILTER_NAME]      = new FilterDataVm <GenreVm, long?>(g => g?.Source?.GenreId, g => g.Name, "Жанр");
     this[YEARS_FILTER_NAME]       = new FilterDataVm <int, int?>(y => y, y => y.ToString(), "Год");
     this[RATINGS_FILTER_NAME]     = new FilterDataVm <float, float?>(r => r, r => $"Больше {r.ToString("F0")}", "Рейтинг");
     this[SELFRATINGS_FILTER_NAME] = new FilterDataVm <int, int?>(r => r, r => $"Нравится {r}", "Нравится");
     this[GENRES_FILTER_NAME].SelectedValueChanged      += FilmFiltersSet_SelectedValueChanged;
     this[YEARS_FILTER_NAME].SelectedValueChanged       += FilmFiltersSet_SelectedValueChanged;
     this[RATINGS_FILTER_NAME].SelectedValueChanged     += FilmFiltersSet_SelectedValueChanged;
     this[SELFRATINGS_FILTER_NAME].SelectedValueChanged += FilmFiltersSet_SelectedValueChanged;
 }
Exemple #2
0
 public SelectedValueChangedEventArgs(FilterDataVm source, object newValue)
 {
     Source   = source;
     NewValue = newValue;
 }