Ejemplo n.º 1
0
		public override void CreateViewModels()
		{
			ServiceFactory.Events.GetEvent<ShowJournalEvent>().Subscribe(OnShowJournal);
			_journalViewModel = new JournalViewModel();
			_archiveViewModel = new ArchiveViewModel();
			ServiceFactory.Events.GetEvent<ShowArchiveEvent>().Unsubscribe(OnShowArchive);
			ServiceFactory.Events.GetEvent<ShowArchiveEvent>().Subscribe(OnShowArchive);
		}
Ejemplo n.º 2
0
		public IEnumerable<ILayoutPartPresenter> GetLayoutParts()
		{
			yield return new LayoutPartPresenter(LayoutPartIdentities.Journal, "Журнал событий", "BBook.png", (p) =>
			{
				var layoutPartJournalProperties = p as LayoutPartJournalProperties;
				var filter = ClientManager.SystemConfiguration.JournalFilters.FirstOrDefault(x => x.UID == layoutPartJournalProperties.FilterUID);
				if (filter == null)
					filter = new JournalFilter();

				var journalViewModel = new JournalViewModel(filter);
				journalViewModel.IsVisibleBottomPanel = layoutPartJournalProperties.IsVisibleBottomPanel;
				journalViewModel.Initialize();
				journalViewModel.SetJournalItems();
				
				return journalViewModel;
			});
			yield return new LayoutPartPresenter(LayoutPartIdentities.Archive, "Архив", "BArchive.png", (p) => _archiveViewModel);
		}