private void ClearFilter(object obj) { FilterText = ""; SelectedFilterPriority = FilterPriorityes.First(); SelectedFilterType = FilterTypes.First(); SelectedFilterNotificationStatus = ENotificationStatus.All; PageNum = 1; LoadNotifications(); }
public StatisticsViewModel(Func <HearthStatsDbContext> dbContext, IRepository <GameResult> gameRepository, IRepository <ArenaSession> arenaRepository, [ImportMany] IEnumerable <IStatsViewModel> statsViewModels) { IsNotifying = false; this.dbContext = dbContext; this.gameRepository = gameRepository; this.arenaRepository = arenaRepository; DisplayName = Header = "Statistics"; Order = 3; dateFilter.From = DateTime.Now.AddMonths(-1); dateFilter.DateChanged += dateFilter_PropertyChanged; SelectedFilterType = FilterTypes.First(); foreach (var statsViewModel in statsViewModels) { Items.Add(statsViewModel); } servers.Insert(0, new ServerItemModel("")); Busy = new BusyWatcher(); PropertyChanged += OnPropertyChanged; }