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)); }
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)); }
public void SelectPeriod(ReportPeriod period) { reportPeriod = period; if (isInitialized) { var initialShortcut = QuickSelectShortcuts.Single(shortcut => shortcut.Period == period); changeDateRange(initialShortcut.GetDateRange().WithSource(ReportsSource.Initial)); } }
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)); }