コード例 #1
0
        public void SelectInitialShortcut()
        {
            var initialShortcut = QuickSelectShortcuts.Single(shortcut => shortcut.Period == reportPeriod);

            selectedDateRangeSubject.OnNext(initialShortcut.GetDateRange().WithSource(ReportsSource.Initial));
            highlightedDateRangeSubject.OnNext(initialShortcut.GetDateRange().WithSource(ReportsSource.Initial));
        }
コード例 #2
0
        public override void ViewAppeared()
        {
            base.ViewAppeared();
            var initialShortcut = QuickSelectShortcuts.Single(shortcut => shortcut.Period == reportPeriod);

            selectedDateRangeSubject.OnNext(initialShortcut.GetDateRange().WithSource(ReportsSource.Initial));
            highlightedDateRangeSubject.OnNext(initialShortcut.GetDateRange().WithSource(ReportsSource.Initial));
        }
コード例 #3
0
        public void SelectPeriod(ReportPeriod period)
        {
            reportPeriod = period;

            if (isInitialized)
            {
                var initialShortcut = QuickSelectShortcuts.Single(shortcut => shortcut.Period == period);
                changeDateRange(initialShortcut.GetDateRange().WithSource(ReportsSource.Initial));
            }
        }
コード例 #4
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));
        }