public PvReportRangeViewModel(int year, PvReportService pvReportService) { _pvReportService = pvReportService; _pvReportService.PvReports.CollectionChanged += OnReportsChanged; Year = year; UpdateReports(); }
public MainViewModel() { _pvReportService = new PvReportService(); _pvReportService.LoadPvReports(); _progressNotificationService = new ProgressNotificationService(); SyncPvReportsViewModel = new SyncPvReportsViewModel(_pvReportService, _progressNotificationService); ProgressVisualizationViewModel = new ProgressVisualizationViewModel(_progressNotificationService); AvailableYearsViewModel = new YearsTabViewModel(_pvReportService); }
public YearSummaryViewModel(int year, PvReportService pvReportService) { Year = year; _pvReportService = pvReportService; _pvReportService.PvReports.CollectionChanged += OnPvReportsCollectionChanged; Months = new ObservableCollection <PvReportRangeModel>(); Initialize(); }
public SyncPvReportsViewModel(PvReportService pvReportService, ProgressNotificationService progressNotificationService) { _pvReportService = pvReportService; _progressNotificationService = progressNotificationService; SyncSettingsModel = StorageService.LoadSynchronizationInfo(); SyncReportsCommand = new Command <object>(OnSyncReportsCommandExecute, OnSyncReportsCommandCanExecute); OpenRepositoryFolderCommand = new Command <object>(OnOpenRepostoryFolderCommandExecute); }
public YearsTabViewModel(PvReportService pvReportService) { _pvReportService = pvReportService; _pvReportService.PvReports.CollectionChanged += OnPvReportsChanged; _yearSummaryVms = new Dictionary <int, YearSummaryViewModel>(); Years = new ObservableCollection <int>(); UpdateYears(); if (Years.Count > 0) { SelectedYear = Years.Max(); } }