public EvaluationManagementViewModel(IMeterViewModelFactory meterViewModelFactory, IMeterReadingViewModelFactory readingViewModelFactory, IMeterRepository meterRepository) { m_ReadingViewModelFactory = readingViewModelFactory; m_Repository = meterRepository; m_Repository.ContextChanged += (s, e) => Application.Current.Dispatcher.Invoke(Reload); Reload(); FlyoutActivated = true; }
public ReadingPlanningViewModel(ISeriesViewModelFactory seriesViewModelFactory, IMeterReadingViewModelFactory readingViewModelFactory, IMeterViewModelFactory meterViewModelFactory, IResponsibleSubjectViewModelFactory responsibleSubjectViewModelFactory, IMeterRepository contextRepository, ITaskGenerator taskGenerator) { m_Repository = contextRepository; m_SeriesViewModelFactory = seriesViewModelFactory; m_ReadingViewModelFactory = readingViewModelFactory; m_Repository.ContextChanged += (s, e) => Application.Current.Dispatcher.Invoke(Reload); Reload(); LocalizeDictionary.Instance.PropertyChanged += delegate(object sender, PropertyChangedEventArgs args) { if (args.PropertyName == "Culture") { if (m_Calendar != null) { m_Calendar.Refresh(); } } }; FlyoutActivated = true; }