Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
            }
        }
        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);
        }
Exemplo n.º 5
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));
        }