public void SetDateFilters(PredefinedDateFilter value)
        {
            DateTime today = trackerFactory.GetDateTimeNow().Date;

            switch (value)
            {
            case PredefinedDateFilter.All:
                filterDateFrom = null;
                filterDateTo   = null;
                break;

            case PredefinedDateFilter.Today:
                filterDateFrom = today.Date;
                filterDateTo   = today.Date;
                break;

            case PredefinedDateFilter.Last7Days:
                filterDateFrom = today.AddDays(-6);
                filterDateTo   = today.Date;
                break;

            case PredefinedDateFilter.ThisMonth:
                filterDateFrom = new DateTime(today.Year, today.Month, 1);
                filterDateTo   = new DateTime(today.Year, today.Month, DateTime.DaysInMonth(today.Year, today.Month));
                break;

            case PredefinedDateFilter.PreviousMonth:
                today          = today.AddMonths(-1); //as we can change year in process!
                filterDateFrom = new DateTime(today.Year, today.Month, 1);
                filterDateTo   = new DateTime(today.Year, today.Month, DateTime.DaysInMonth(today.Year, today.Month));
                break;

            default:
                break;
            }
        }
 public FilterDateViewModel(ITrackerFactory trackerFactory)
 {
     this.trackerFactory           = trackerFactory;
     this.settings                 = trackerFactory.GetService <ISettings>();
     this.FilterDateSelectedOption = settings.GamesFilter_SelectedPredefinedDateFilter;
 }