public void Initialize() { if (XManager.DeviceConfiguration.JournalFilters != null) foreach (var journalFilter in XManager.DeviceConfiguration.JournalFilters) { var filteredJournalViewModel = new JournalViewModel(journalFilter); Journals.Add(filteredJournalViewModel); } }
public void Initialize() { Journals = new ObservableCollection<JournalViewModel>(); Journals.Add(new JournalViewModel(new XJournalFilter() { Name = " Все события" })); SelectedJournal = Journals.FirstOrDefault(); ServiceFactory.Events.GetEvent<NewXJournalEvent>().Unsubscribe(OnNewJournal); ServiceFactory.Events.GetEvent<NewXJournalEvent>().Subscribe(OnNewJournal); foreach (var journalFilter in XManager.DeviceConfiguration.JournalFilters) { var filteredJournalViewModel = new JournalViewModel(journalFilter); Journals.Add(filteredJournalViewModel); } }
void OnReadJournal() { var journalViewModel = new JournalViewModel(SelectedDevice.Device); if (journalViewModel.Initialize()) { DialogService.ShowModalWindow(journalViewModel); } }
void OnReadJournal() { var journalViewModel = new JournalViewModel(SelectedDevice.Device); DialogService.ShowModalWindow(journalViewModel); }
void UpdateSelectedJournal() { var selectedJournal = SelectedJournal; SelectedJournal = null; SelectedJournal = selectedJournal; }