public async override Task Initialize()
        {
            await base.Initialize();

            BeginningOfWeek = (await dataSource.User.Current).BeginningOfWeek;
            fillMonthArray();
            RaisePropertyChanged(nameof(CurrentMonth));

            QuickSelectShortcuts = createQuickSelectShortcuts();

            QuickSelectShortcuts
            .Select(quickSelectShortcut => SelectedDateRangeObservable.Subscribe(
                        quickSelectShortcut.OnDateRangeChanged))
            .ForEach(disposableBag.Add);
        }
示例#2
0
        public override async Task Initialize()
        {
            await base.Initialize();

            BeginningOfWeek = (await dataSource.User.Current.FirstAsync()).BeginningOfWeek;
            fillMonthArray();
            RaisePropertyChanged(nameof(CurrentMonth));

            QuickSelectShortcuts = createQuickSelectShortcuts();

            QuickSelectShortcuts
            .Select(quickSelectShortcut => SelectedDateRangeObservable.Subscribe(
                        quickSelectShortcut.OnDateRangeChanged))
            .ForEach(disposableBag.Add);

            var initialShortcut = QuickSelectShortcuts.Single(shortcut => shortcut is CalendarThisWeekQuickSelectShortcut);

            changeDateRange(initialShortcut.GetDateRange().WithSource(ReportsSource.Initial));
        }