コード例 #1
0
ファイル: JournalsViewModel.cs プロジェクト: hjlfmy/Rubezh
 public void Initialize()
 {
     if (XManager.DeviceConfiguration.JournalFilters != null)
         foreach (var journalFilter in XManager.DeviceConfiguration.JournalFilters)
         {
             var filteredJournalViewModel = new JournalViewModel(journalFilter);
             Journals.Add(filteredJournalViewModel);
         }
 }
コード例 #2
0
		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);
			}
		}
コード例 #3
0
		void OnReadJournal()
		{
			var journalViewModel = new JournalViewModel(SelectedDevice.Device);
			if (journalViewModel.Initialize())
			{
				DialogService.ShowModalWindow(journalViewModel);
			}
		}
コード例 #4
0
 void OnReadJournal()
 {
     var journalViewModel = new JournalViewModel(SelectedDevice.Device);
     DialogService.ShowModalWindow(journalViewModel);
 }
コード例 #5
0
		void UpdateSelectedJournal()
		{
			var selectedJournal = SelectedJournal;
			SelectedJournal = null;
			SelectedJournal = selectedJournal;
		}